2011-03-16 21:52:38 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
|
|
|
|
; CHECK-NOT: {{(min|max|mov)}}
|
|
|
|
; CHECK: mov
|
|
|
|
; CHECK-NOT: {{(min|max|mov)}}
|
|
|
|
; CHECK: min
|
|
|
|
; CHECK-NOT: {{(min|max|mov)}}
|
|
|
|
; CHECK: mov
|
|
|
|
; CHECK-NOT: {{(min|max|mov)}}
|
|
|
|
; CHECK: max
|
|
|
|
; CHECK-NOT: {{(min|max|mov)}}
|
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
|
|
|
|
}
|