summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/scalar-min-max-fill-operand.ll
blob: 6a6283a10dab7afb0f20e859479c9eefed098c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llvm-as < %s | llc -march=x86-64 | grep min | count 1
; RUN: llvm-as < %s | llc -march=x86-64 | grep max | count 1
; RUN: llvm-as < %s | llc -march=x86-64 | grep mov | count 2

declare float @bar()

define float @foo(float %a)
{
  %s = call float @bar()
  %t = fcmp olt float %s, %a
  %u = select i1 %t, float %s, float %a
  ret float %u
}
define float @hem(float %a)
{
  %s = call float @bar()
  %t = fcmp uge float %s, %a
  %u = select i1 %t, float %s, float %a
  ret float %u
}