diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-03 03:58:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-03 03:58:05 +0000 |
commit | f297c931913ec4285395fa278fa9c9898685c469 (patch) | |
tree | 4b66e2485a780b2df350de43629ae3a6a720d7ef /test | |
parent | b0cfa6cab85ce19c8ecaf9cdd3e34a3593d0b001 (diff) | |
download | external_llvm-f297c931913ec4285395fa278fa9c9898685c469.zip external_llvm-f297c931913ec4285395fa278fa9c9898685c469.tar.gz external_llvm-f297c931913ec4285395fa278fa9c9898685c469.tar.bz2 |
Fix PR9127 by reversing the operands even if they have more then one use.
Reversing the operands allows us to fold, but doesn't force us to. Also, at
this point the DAG is still being optimized, so the check for hasOneUse is not
very precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/pr9127.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr9127.ll b/test/CodeGen/X86/pr9127.ll new file mode 100644 index 0000000..af08490 --- /dev/null +++ b/test/CodeGen/X86/pr9127.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s | FileCheck %s + +define i8 @foobar(double %d, double* %x) { +entry: + %tmp2 = load double* %x, align 8 + %cmp = fcmp oeq double %tmp2, %d + %conv3 = zext i1 %cmp to i8 + ret i8 %conv3 +} + +; test that the load is folded. +; CHECK: ucomisd (%rdi), %xmm0 |