blob: fe40758d8ecd992e51c94deada25fcaf8f6a0a97 [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86-64 | grep min | count 1
2; RUN: llc < %s -march=x86-64 | grep max | count 1
3; RUN: llc < %s -march=x86-64 | grep mov | count 2
Dan Gohman02e25b72007-07-10 15:34:29 +00004
5declare float @bar()
6
Dan Gohman670e5392009-09-21 18:03:22 +00007define float @foo(float %a) nounwind
Dan Gohman02e25b72007-07-10 15:34:29 +00008{
9 %s = call float @bar()
10 %t = fcmp olt float %s, %a
11 %u = select i1 %t, float %s, float %a
12 ret float %u
13}
Dan Gohman670e5392009-09-21 18:03:22 +000014define float @hem(float %a) nounwind
Dan Gohman02e25b72007-07-10 15:34:29 +000015{
16 %s = call float @bar()
Dan Gohman670e5392009-09-21 18:03:22 +000017 %t = fcmp ogt float %s, %a
Dan Gohman02e25b72007-07-10 15:34:29 +000018 %u = select i1 %t, float %s, float %a
19 ret float %u
20}