llvm.org GIT mirror llvm / 02e25b7
Add a regression test for folding spill code into scalar min and max. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38492 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
1 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=x86-64 | grep min | wc -l | grep 1
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep max | wc -l | grep 1
2 ; RUN: llvm-as < %s | llc -march=x86-64 | grep mov | wc -l | grep 2
3
4 declare float @bar()
5
6 define float @foo(float %a)
7 {
8 %s = call float @bar()
9 %t = fcmp olt float %s, %a
10 %u = select i1 %t, float %s, float %a
11 ret float %u
12 }
13 define float @hem(float %a)
14 {
15 %s = call float @bar()
16 %t = fcmp uge float %s, %a
17 %u = select i1 %t, float %s, float %a
18 ret float %u
19 }