8625704ad8
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
10 lines
226 B
LLVM
10 lines
226 B
LLVM
; RUN: llc -march=hexagon < %s | FileCheck %s
|
|
; CHECK: max
|
|
|
|
define i32 @f(i32 %src, i32 %maxval) nounwind readnone {
|
|
entry:
|
|
%cmp = icmp slt i32 %maxval, %src
|
|
%cond = select i1 %cmp, i32 %src, i32 %maxval
|
|
ret i32 %cond
|
|
}
|