2009-09-08 23:54:48 +00:00
|
|
|
; RUN: llc < %s -march=x86-64 | grep min | count 1
|
|
|
|
; RUN: llc < %s -march=x86-64 | grep max | count 1
|
|
|
|
; RUN: llc < %s -march=x86-64 | grep mov | count 2
|
2007-07-10 15:34:29 +00:00
|
|
|
|
|
|
|
declare float @bar()
|
|
|
|
|
2009-09-21 18:03:22 +00:00
|
|
|
define float @foo(float %a) nounwind
|
2007-07-10 15:34:29 +00:00
|
|
|
{
|
|
|
|
%s = call float @bar()
|
|
|
|
%t = fcmp olt float %s, %a
|
|
|
|
%u = select i1 %t, float %s, float %a
|
|
|
|
ret float %u
|
|
|
|
}
|
2009-09-21 18:03:22 +00:00
|
|
|
define float @hem(float %a) nounwind
|
2007-07-10 15:34:29 +00:00
|
|
|
{
|
|
|
|
%s = call float @bar()
|
2009-09-21 18:03:22 +00:00
|
|
|
%t = fcmp ogt float %s, %a
|
2007-07-10 15:34:29 +00:00
|
|
|
%u = select i1 %t, float %s, float %a
|
|
|
|
ret float %u
|
|
|
|
}
|