diff options
author | Dan Gohman <gohman@apple.com> | 2007-07-10 15:34:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-07-10 15:34:29 +0000 |
commit | 4bd45b3d5361fab9dd8d1b7936d3d26a5df0f2fe (patch) | |
tree | 17e92acb0302127c7b4d3039e394beee1a5d0ceb /llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll | |
parent | adb3d37c07bf4c7911498301af122a260c6da89f (diff) | |
download | bcm5719-llvm-4bd45b3d5361fab9dd8d1b7936d3d26a5df0f2fe.tar.gz bcm5719-llvm-4bd45b3d5361fab9dd8d1b7936d3d26a5df0f2fe.zip |
Add a regression test for folding spill code into scalar min and max.
llvm-svn: 38492
Diffstat (limited to 'llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll b/llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll new file mode 100644 index 00000000000..9d6fc4ff3c7 --- /dev/null +++ b/llvm/test/CodeGen/X86/scalar-min-max-fill-operand.ll @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep min | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86-64 | grep max | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86-64 | grep mov | wc -l | grep 2 + +declare float @bar() + +define float @foo(float %a) +{ + %s = call float @bar() + %t = fcmp olt float %s, %a + %u = select i1 %t, float %s, float %a + ret float %u +} +define float @hem(float %a) +{ + %s = call float @bar() + %t = fcmp uge float %s, %a + %u = select i1 %t, float %s, float %a + ret float %u +} |