diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:23 +0000 |
commit | edad5bcb76bf472a1487c0f3dd94a5914213a647 (patch) | |
tree | 63c3f98843d0debbfd390005cf8e05250cd3fe28 /test/CodeGen/X86/fp128-cast.ll | |
parent | 0bc1bd0d3931803dc6a26d35758f93527359bcdb (diff) | |
download | src-test-edad5bcb76bf472a1487c0f3dd94a5914213a647.tar.gz src-test-edad5bcb76bf472a1487c0f3dd94a5914213a647.zip |
Notes
Diffstat (limited to 'test/CodeGen/X86/fp128-cast.ll')
-rw-r--r-- | test/CodeGen/X86/fp128-cast.ll | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fp128-cast.ll b/test/CodeGen/X86/fp128-cast.ll index 6543292c08b4c..560892485d899 100644 --- a/test/CodeGen/X86/fp128-cast.ll +++ b/test/CodeGen/X86/fp128-cast.ll @@ -1,5 +1,7 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -O2 -mtriple=x86_64-linux-android -mattr=+mmx | FileCheck %s --check-prefix=X64 ; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=+mmx | FileCheck %s --check-prefix=X64 +; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=-mmx | FileCheck %s --check-prefix=X64_NO_MMX ; RUN: llc < %s -O2 -mtriple=i686-linux-gnu -mattr=+mmx | FileCheck %s --check-prefix=X32 ; Check soft floating point conversion function calls. @@ -359,6 +361,69 @@ cleanup: ; preds = %entry, %if.then ; X64: retq } +define i1 @PR34866(i128 %x) { +; X64-LABEL: PR34866: +; X64: # BB#0: +; X64-NEXT: movaps {{.*}}(%rip), %xmm0 +; X64-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp) +; X64-NEXT: xorq -{{[0-9]+}}(%rsp), %rsi +; X64-NEXT: xorq -{{[0-9]+}}(%rsp), %rdi +; X64-NEXT: orq %rsi, %rdi +; X64-NEXT: sete %al +; X64-NEXT: retq +; +; X64_NO_MMX-LABEL: PR34866: +; X64_NO_MMX: # BB#0: +; X64_NO_MMX-NEXT: orq %rsi, %rdi +; X64_NO_MMX-NEXT: sete %al +; X64_NO_MMX-NEXT: retq +; +; X32-LABEL: PR34866: +; X32: # BB#0: +; X32-NEXT: movl {{[0-9]+}}(%esp), %eax +; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: orl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: orl {{[0-9]+}}(%esp), %eax +; X32-NEXT: orl %ecx, %eax +; X32-NEXT: sete %al +; X32-NEXT: retl + %bc_mmx = bitcast fp128 0xL00000000000000000000000000000000 to i128 + %cmp = icmp eq i128 %bc_mmx, %x + ret i1 %cmp +} + +define i1 @PR34866_commute(i128 %x) { +; X64-LABEL: PR34866_commute: +; X64: # BB#0: +; X64-NEXT: movaps {{.*}}(%rip), %xmm0 +; X64-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp) +; X64-NEXT: xorq -{{[0-9]+}}(%rsp), %rsi +; X64-NEXT: xorq -{{[0-9]+}}(%rsp), %rdi +; X64-NEXT: orq %rsi, %rdi +; X64-NEXT: sete %al +; X64-NEXT: retq +; +; X64_NO_MMX-LABEL: PR34866_commute: +; X64_NO_MMX: # BB#0: +; X64_NO_MMX-NEXT: orq %rsi, %rdi +; X64_NO_MMX-NEXT: sete %al +; X64_NO_MMX-NEXT: retq +; +; X32-LABEL: PR34866_commute: +; X32: # BB#0: +; X32-NEXT: movl {{[0-9]+}}(%esp), %eax +; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: orl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: orl {{[0-9]+}}(%esp), %eax +; X32-NEXT: orl %ecx, %eax +; X32-NEXT: sete %al +; X32-NEXT: retl + %bc_mmx = bitcast fp128 0xL00000000000000000000000000000000 to i128 + %cmp = icmp eq i128 %x, %bc_mmx + ret i1 %cmp +} + + declare double @copysign(double, double) #1 attributes #2 = { nounwind readnone } |