2009-09-09 07:54:48 +08: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 23:34:29 +08:00
|
|
|
|
|
|
|
declare float @bar()
|
|
|
|
|
2009-09-22 02:03:22 +08:00
|
|
|
define float @foo(float %a) nounwind
|
2007-07-10 23:34:29 +08:00
|
|
|
{
|
|
|
|
%s = call float @bar()
|
|
|
|
%t = fcmp olt float %s, %a
|
|
|
|
%u = select i1 %t, float %s, float %a
|
|
|
|
ret float %u
|
|
|
|
}
|
2009-09-22 02:03:22 +08:00
|
|
|
define float @hem(float %a) nounwind
|
2007-07-10 23:34:29 +08:00
|
|
|
{
|
|
|
|
%s = call float @bar()
|
2009-09-22 02:03:22 +08:00
|
|
|
%t = fcmp ogt float %s, %a
|
2007-07-10 23:34:29 +08:00
|
|
|
%u = select i1 %t, float %s, float %a
|
|
|
|
ret float %u
|
|
|
|
}
|