2011-03-16 14:52:38 +01: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 17:34:29 +02:00
|
|
|
|
|
|
|
declare float @bar()
|
|
|
|
|
2009-09-21 20:03:22 +02:00
|
|
|
define float @foo(float %a) nounwind
|
2007-07-10 17:34:29 +02: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 20:03:22 +02:00
|
|
|
define float @hem(float %a) nounwind
|
2007-07-10 17:34:29 +02:00
|
|
|
{
|
|
|
|
%s = call float @bar()
|
2009-09-21 20:03:22 +02:00
|
|
|
%t = fcmp ogt float %s, %a
|
2007-07-10 17:34:29 +02:00
|
|
|
%u = select i1 %t, float %s, float %a
|
|
|
|
ret float %u
|
|
|
|
}
|