-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[X86][GlobalISel] Support fp80 for G_FPTRUNC and G_FPEXT #141611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
e-kud
wants to merge
12
commits into
llvm:main
Choose a base branch
from
e-kud:global-fp-trunc-ext
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+327
−16
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a603218
Precommit tests
e-kud cd09cc3
[X86][GlobalISel] Support fp80 for G_FPTRUNC and G_FPEXT
e-kud 62afbcf
Merge remote-tracking branch 'origin/main' into global-fp-trunc-ext
e-kud f02cc9e
Merge remote-tracking branch 'origin/main' into global-fp-trunc-ext
e-kud 1d9a328
Merge remote-tracking branch 'origin/main' into global-fp-trunc-ext
e-kud b200eab
Merge branch 'main' into global-fp-trunc-ext
e-kud 46f338d
Merge branch 'main' into global-fp-trunc-ext
e-kud 7f413f1
Merge branch 'main' into global-fp-trunc-ext
e-kud ddef930
Merge branch 'main' into global-fp-trunc-ext
e-kud 8099816
Generalize FPTRUNC/FPEXT lowering using mem
e-kud e1cc4b1
Merge remote-tracking branch 'origin/main' into global-fp-trunc-ext
e-kud 8ec2dd9
Merge branch 'main' into global-fp-trunc-ext
e-kud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4731,6 +4731,8 @@ LegalizerHelper::lower(MachineInstr &MI, unsigned TypeIdx, LLT LowerHintTy) { | |
case G_FPTOUI_SAT: | ||
case G_FPTOSI_SAT: | ||
return lowerFPTOINT_SAT(MI); | ||
case G_FPEXT: | ||
return lowerFPExtAndTruncMem(MI); | ||
case G_FPTRUNC: | ||
return lowerFPTRUNC(MI); | ||
case G_FPOWI: | ||
|
@@ -8473,6 +8475,33 @@ LegalizerHelper::lowerFPTOINT_SAT(MachineInstr &MI) { | |
return Legalized; | ||
} | ||
|
||
// fp conversions using truncating and extending loads and stores. | ||
LegalizerHelper::LegalizeResult | ||
LegalizerHelper::lowerFPExtAndTruncMem(MachineInstr &MI) { | ||
assert((MI.getOpcode() == TargetOpcode::G_FPEXT || | ||
MI.getOpcode() == TargetOpcode::G_FPTRUNC) && | ||
"Only G_FPEXT and G_FPTRUNC are expected"); | ||
|
||
auto [DstReg, DstTy, SrcReg, SrcTy] = MI.getFirst2RegLLTs(); | ||
MachinePointerInfo PtrInfo; | ||
LLT StackTy = MI.getOpcode() == TargetOpcode::G_FPEXT ? SrcTy : DstTy; | ||
Align StackTyAlign = getStackTemporaryAlignment(StackTy); | ||
auto StackTemp = | ||
createStackTemporary(StackTy.getSizeInBytes(), StackTyAlign, PtrInfo); | ||
|
||
MachineFunction &MF = MIRBuilder.getMF(); | ||
auto *StoreMMO = MF.getMachineMemOperand(PtrInfo, MachineMemOperand::MOStore, | ||
StackTy, StackTyAlign); | ||
MIRBuilder.buildStore(SrcReg, StackTemp, *StoreMMO); | ||
|
||
auto *LoadMMO = MF.getMachineMemOperand(PtrInfo, MachineMemOperand::MOLoad, | ||
StackTy, StackTyAlign); | ||
MIRBuilder.buildLoad(DstReg, StackTemp, *LoadMMO); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can't just use a regular load and store. We should have a proper FP extending load opcode (like G_ZEXTLOAD), and also need the truncate case |
||
|
||
MI.eraseFromParent(); | ||
return Legalized; | ||
} | ||
|
||
// f64 -> f16 conversion using round-to-nearest-even rounding mode. | ||
LegalizerHelper::LegalizeResult | ||
LegalizerHelper::lowerFPTRUNC_F64_TO_F16(MachineInstr &MI) { | ||
|
@@ -8598,7 +8627,7 @@ LegalizerHelper::lowerFPTRUNC(MachineInstr &MI) { | |
if (DstTy.getScalarType() == S16 && SrcTy.getScalarType() == S64) | ||
return lowerFPTRUNC_F64_TO_F16(MI); | ||
|
||
return UnableToLegalize; | ||
return lowerFPExtAndTruncMem(MI); | ||
} | ||
|
||
LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPOWI(MachineInstr &MI) { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,279 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple=i686-unknown-unknown -fast-isel=0 -global-isel=0 | FileCheck %s --check-prefixes X86,FASTSDAG-X86,SDAG-X86 | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel=0 -global-isel=0 | FileCheck %s --check-prefixes SSE,FASTSDAG-SSE,SDAG-SSE | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel=0 -global-isel=0 | FileCheck %s --check-prefixes AVX,FASTSDAG-AVX,SDAG-AVX | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -fast-isel=0 -global-isel=0 | FileCheck %s --check-prefixes AVX,FASTSDAG-AVX,SDAG-AVX | ||
; COMM: FastISel has troubles with fp80 type | ||
; RUN: llc < %s -mtriple=i686-unknown-unknown -fast-isel=1 -global-isel=0 -fast-isel-abort=0 | FileCheck %s --check-prefixes X86,FASTSDAG-X86,FAST-X86 | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel=1 -global-isel=0 -fast-isel-abort=0 | FileCheck %s --check-prefixes SSE,FASTSDAG-SSE,FAST-SSE | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel=1 -global-isel=0 -fast-isel-abort=0 | FileCheck %s --check-prefixes AVX,FASTSDAG-AVX,FAST-AVX | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -fast-isel=1 -global-isel=0 -fast-isel-abort=0 | FileCheck %s --check-prefixes AVX,FASTSDAG-AVX,FAST-AVX | ||
; COMM: GlobalISel can't legalize double stores on 32bit platform due to lack of double/integer distinguish during legalization | ||
; RUN: llc < %s -mtriple=i686-unknown-unknown -fast-isel=0 -global-isel=1 -global-isel-abort=2 | FileCheck %s --check-prefixes X86,GLOBAL-X86 | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel=0 -global-isel=1 -global-isel-abort=1 | FileCheck %s --check-prefixes SSE,GLOBAL-SSE | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel=0 -global-isel=1 -global-isel-abort=1 | FileCheck %s --check-prefixes AVX,GLOBAL-AVX | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -fast-isel=0 -global-isel=1 -global-isel-abort=1 | FileCheck %s --check-prefixes AVX,GLOBAL-AVX | ||
|
||
define double @fpext_float_to_double(float %f) { | ||
; X86-LABEL: fpext_float_to_double: | ||
; X86: # %bb.0: | ||
; X86-NEXT: flds {{[0-9]+}}(%esp) | ||
; X86-NEXT: retl | ||
; | ||
; SSE-LABEL: fpext_float_to_double: | ||
; SSE: # %bb.0: | ||
; SSE-NEXT: cvtss2sd %xmm0, %xmm0 | ||
; SSE-NEXT: retq | ||
; | ||
; AVX-LABEL: fpext_float_to_double: | ||
; AVX: # %bb.0: | ||
; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0 | ||
; AVX-NEXT: retq | ||
%1 = fpext float %f to double | ||
ret double %1 | ||
} | ||
|
||
define x86_fp80 @fpext_float_to_x86_fp80(float %f) { | ||
; FASTSDAG-X86-LABEL: fpext_float_to_x86_fp80: | ||
; FASTSDAG-X86: # %bb.0: | ||
; FASTSDAG-X86-NEXT: flds {{[0-9]+}}(%esp) | ||
; FASTSDAG-X86-NEXT: retl | ||
; | ||
; FASTSDAG-SSE-LABEL: fpext_float_to_x86_fp80: | ||
; FASTSDAG-SSE: # %bb.0: | ||
; FASTSDAG-SSE-NEXT: movss %xmm0, -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: flds -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: retq | ||
; | ||
; FASTSDAG-AVX-LABEL: fpext_float_to_x86_fp80: | ||
; FASTSDAG-AVX: # %bb.0: | ||
; FASTSDAG-AVX-NEXT: vmovss %xmm0, -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: flds -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: retq | ||
; | ||
; GLOBAL-X86-LABEL: fpext_float_to_x86_fp80: | ||
; GLOBAL-X86: # %bb.0: | ||
; GLOBAL-X86-NEXT: pushl %eax | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_offset 8 | ||
; GLOBAL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax | ||
; GLOBAL-X86-NEXT: movl %eax, (%esp) | ||
; GLOBAL-X86-NEXT: flds (%esp) | ||
; GLOBAL-X86-NEXT: popl %eax | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_offset 4 | ||
; GLOBAL-X86-NEXT: retl | ||
; | ||
; GLOBAL-SSE-LABEL: fpext_float_to_x86_fp80: | ||
; GLOBAL-SSE: # %bb.0: | ||
; GLOBAL-SSE-NEXT: movd %xmm0, %eax | ||
; GLOBAL-SSE-NEXT: movl %eax, -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: flds -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: retq | ||
; | ||
; GLOBAL-AVX-LABEL: fpext_float_to_x86_fp80: | ||
; GLOBAL-AVX: # %bb.0: | ||
; GLOBAL-AVX-NEXT: vmovd %xmm0, %eax | ||
; GLOBAL-AVX-NEXT: movl %eax, -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: flds -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: retq | ||
%1 = fpext float %f to x86_fp80 | ||
ret x86_fp80 %1 | ||
} | ||
|
||
define x86_fp80 @fpext_double_to_x86_fp80(double %d) { | ||
; FASTSDAG-X86-LABEL: fpext_double_to_x86_fp80: | ||
; FASTSDAG-X86: # %bb.0: | ||
; FASTSDAG-X86-NEXT: fldl {{[0-9]+}}(%esp) | ||
; FASTSDAG-X86-NEXT: retl | ||
; | ||
; FASTSDAG-SSE-LABEL: fpext_double_to_x86_fp80: | ||
; FASTSDAG-SSE: # %bb.0: | ||
; FASTSDAG-SSE-NEXT: movsd %xmm0, -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: fldl -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: retq | ||
; | ||
; FASTSDAG-AVX-LABEL: fpext_double_to_x86_fp80: | ||
; FASTSDAG-AVX: # %bb.0: | ||
; FASTSDAG-AVX-NEXT: vmovsd %xmm0, -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: fldl -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: retq | ||
; | ||
; GLOBAL-X86-LABEL: fpext_double_to_x86_fp80: | ||
; GLOBAL-X86: # %bb.0: | ||
; GLOBAL-X86-NEXT: pushl %ebp | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_offset 8 | ||
; GLOBAL-X86-NEXT: .cfi_offset %ebp, -8 | ||
; GLOBAL-X86-NEXT: movl %esp, %ebp | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_register %ebp | ||
; GLOBAL-X86-NEXT: andl $-8, %esp | ||
; GLOBAL-X86-NEXT: subl $8, %esp | ||
; GLOBAL-X86-NEXT: leal 8(%ebp), %eax | ||
; GLOBAL-X86-NEXT: movl 8(%ebp), %ecx | ||
; GLOBAL-X86-NEXT: movl 4(%eax), %eax | ||
; GLOBAL-X86-NEXT: movl %esp, %edx | ||
; GLOBAL-X86-NEXT: movl %ecx, (%esp) | ||
; GLOBAL-X86-NEXT: movl %eax, 4(%edx) | ||
; GLOBAL-X86-NEXT: fldl (%esp) | ||
; GLOBAL-X86-NEXT: movl %ebp, %esp | ||
; GLOBAL-X86-NEXT: popl %ebp | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa %esp, 4 | ||
; GLOBAL-X86-NEXT: retl | ||
; | ||
; GLOBAL-SSE-LABEL: fpext_double_to_x86_fp80: | ||
; GLOBAL-SSE: # %bb.0: | ||
; GLOBAL-SSE-NEXT: movq %xmm0, %rax | ||
; GLOBAL-SSE-NEXT: movq %rax, -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: fldl -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: retq | ||
; | ||
; GLOBAL-AVX-LABEL: fpext_double_to_x86_fp80: | ||
; GLOBAL-AVX: # %bb.0: | ||
; GLOBAL-AVX-NEXT: vmovq %xmm0, %rax | ||
; GLOBAL-AVX-NEXT: movq %rax, -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: fldl -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: retq | ||
%1 = fpext double %d to x86_fp80 | ||
ret x86_fp80 %1 | ||
} | ||
|
||
define float @fptrunc_double_to_float(double %d) { | ||
; FASTSDAG-X86-LABEL: fptrunc_double_to_float: | ||
; FASTSDAG-X86: # %bb.0: | ||
; FASTSDAG-X86-NEXT: pushl %eax | ||
; FASTSDAG-X86-NEXT: .cfi_def_cfa_offset 8 | ||
; FASTSDAG-X86-NEXT: fldl {{[0-9]+}}(%esp) | ||
; FASTSDAG-X86-NEXT: fstps (%esp) | ||
; FASTSDAG-X86-NEXT: flds (%esp) | ||
; FASTSDAG-X86-NEXT: popl %eax | ||
; FASTSDAG-X86-NEXT: .cfi_def_cfa_offset 4 | ||
; FASTSDAG-X86-NEXT: retl | ||
; | ||
; SSE-LABEL: fptrunc_double_to_float: | ||
; SSE: # %bb.0: | ||
; SSE-NEXT: cvtsd2ss %xmm0, %xmm0 | ||
; SSE-NEXT: retq | ||
; | ||
; AVX-LABEL: fptrunc_double_to_float: | ||
; AVX: # %bb.0: | ||
; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0 | ||
; AVX-NEXT: retq | ||
; | ||
; GLOBAL-X86-LABEL: fptrunc_double_to_float: | ||
; GLOBAL-X86: # %bb.0: | ||
; GLOBAL-X86-NEXT: pushl %eax | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_offset 8 | ||
; GLOBAL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax | ||
; GLOBAL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx | ||
; GLOBAL-X86-NEXT: movl 4(%eax), %eax | ||
; GLOBAL-X86-NEXT: movl %esp, %edx | ||
; GLOBAL-X86-NEXT: movl %ecx, (%esp) | ||
; GLOBAL-X86-NEXT: movl %eax, 4(%edx) | ||
; GLOBAL-X86-NEXT: flds (%esp) | ||
; GLOBAL-X86-NEXT: popl %eax | ||
; GLOBAL-X86-NEXT: .cfi_def_cfa_offset 4 | ||
; GLOBAL-X86-NEXT: retl | ||
%1 = fptrunc double %d to float | ||
ret float %1 | ||
} | ||
|
||
define float @fptrunc_x86_fp80_to_float(x86_fp80 %x) { | ||
; X86-LABEL: fptrunc_x86_fp80_to_float: | ||
; X86: # %bb.0: | ||
; X86-NEXT: pushl %eax | ||
; X86-NEXT: .cfi_def_cfa_offset 8 | ||
; X86-NEXT: fldt {{[0-9]+}}(%esp) | ||
; X86-NEXT: fstps (%esp) | ||
; X86-NEXT: flds (%esp) | ||
; X86-NEXT: popl %eax | ||
; X86-NEXT: .cfi_def_cfa_offset 4 | ||
; X86-NEXT: retl | ||
; | ||
; FASTSDAG-SSE-LABEL: fptrunc_x86_fp80_to_float: | ||
; FASTSDAG-SSE: # %bb.0: | ||
; FASTSDAG-SSE-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: fstps -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero | ||
; FASTSDAG-SSE-NEXT: retq | ||
; | ||
; FASTSDAG-AVX-LABEL: fptrunc_x86_fp80_to_float: | ||
; FASTSDAG-AVX: # %bb.0: | ||
; FASTSDAG-AVX-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: fstps -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero | ||
; FASTSDAG-AVX-NEXT: retq | ||
; | ||
; GLOBAL-SSE-LABEL: fptrunc_x86_fp80_to_float: | ||
; GLOBAL-SSE: # %bb.0: | ||
; GLOBAL-SSE-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: fstps -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: movl -{{[0-9]+}}(%rsp), %eax | ||
; GLOBAL-SSE-NEXT: movd %eax, %xmm0 | ||
; GLOBAL-SSE-NEXT: retq | ||
; | ||
; GLOBAL-AVX-LABEL: fptrunc_x86_fp80_to_float: | ||
; GLOBAL-AVX: # %bb.0: | ||
; GLOBAL-AVX-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: fstps -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: movl -{{[0-9]+}}(%rsp), %eax | ||
; GLOBAL-AVX-NEXT: vmovd %eax, %xmm0 | ||
; GLOBAL-AVX-NEXT: retq | ||
%1 = fptrunc x86_fp80 %x to float | ||
ret float %1 | ||
} | ||
|
||
define double @fptrunc_x86_fp80_to_double(x86_fp80 %x) { | ||
; X86-LABEL: fptrunc_x86_fp80_to_double: | ||
; X86: # %bb.0: | ||
; X86-NEXT: pushl %ebp | ||
; X86-NEXT: .cfi_def_cfa_offset 8 | ||
; X86-NEXT: .cfi_offset %ebp, -8 | ||
; X86-NEXT: movl %esp, %ebp | ||
; X86-NEXT: .cfi_def_cfa_register %ebp | ||
; X86-NEXT: andl $-8, %esp | ||
; X86-NEXT: subl $8, %esp | ||
; X86-NEXT: fldt 8(%ebp) | ||
; X86-NEXT: fstpl (%esp) | ||
; X86-NEXT: fldl (%esp) | ||
; X86-NEXT: movl %ebp, %esp | ||
; X86-NEXT: popl %ebp | ||
; X86-NEXT: .cfi_def_cfa %esp, 4 | ||
; X86-NEXT: retl | ||
; | ||
; FASTSDAG-SSE-LABEL: fptrunc_x86_fp80_to_double: | ||
; FASTSDAG-SSE: # %bb.0: | ||
; FASTSDAG-SSE-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: fstpl -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero | ||
; FASTSDAG-SSE-NEXT: retq | ||
; | ||
; FASTSDAG-AVX-LABEL: fptrunc_x86_fp80_to_double: | ||
; FASTSDAG-AVX: # %bb.0: | ||
; FASTSDAG-AVX-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: fstpl -{{[0-9]+}}(%rsp) | ||
; FASTSDAG-AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero | ||
; FASTSDAG-AVX-NEXT: retq | ||
; | ||
; GLOBAL-SSE-LABEL: fptrunc_x86_fp80_to_double: | ||
; GLOBAL-SSE: # %bb.0: | ||
; GLOBAL-SSE-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: fstpl -{{[0-9]+}}(%rsp) | ||
; GLOBAL-SSE-NEXT: movq -{{[0-9]+}}(%rsp), %rax | ||
; GLOBAL-SSE-NEXT: movq %rax, %xmm0 | ||
; GLOBAL-SSE-NEXT: retq | ||
; | ||
; GLOBAL-AVX-LABEL: fptrunc_x86_fp80_to_double: | ||
; GLOBAL-AVX: # %bb.0: | ||
; GLOBAL-AVX-NEXT: fldt {{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: fstpl -{{[0-9]+}}(%rsp) | ||
; GLOBAL-AVX-NEXT: movq -{{[0-9]+}}(%rsp), %rax | ||
; GLOBAL-AVX-NEXT: vmovq %rax, %xmm0 | ||
; GLOBAL-AVX-NEXT: retq | ||
%1 = fptrunc x86_fp80 %x to double | ||
ret double %1 | ||
} | ||
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | ||
; FAST-AVX: {{.*}} | ||
; FAST-SSE: {{.*}} | ||
; FAST-X86: {{.*}} | ||
; SDAG-AVX: {{.*}} | ||
; SDAG-SSE: {{.*}} | ||
; SDAG-X86: {{.*}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.