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 | d11311f29123e98c46310dd9b76c87b71b9f7bae (patch) | |
| tree | c25c8b9824857874dc463661ce82cfc6a0057db4 /llvm/test/CodeGen | |
| parent | 9aa47fcb55a54263793650e1e2e665614c363bdb (diff) | |
| download | bcm5719-llvm-d11311f29123e98c46310dd9b76c87b71b9f7bae.tar.gz bcm5719-llvm-d11311f29123e98c46310dd9b76c87b71b9f7bae.zip | |
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.
llvm-svn: 124773
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/pr9127.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr9127.ll b/llvm/test/CodeGen/X86/pr9127.ll new file mode 100644 index 00000000000..af08490b83d --- /dev/null +++ b/llvm/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 |

