1; RUN: llc -march=hexagon < %s | FileCheck %s
2; CHECK: min
3
4define i32 @f(i32 %src, i32 %maxval) nounwind readnone {
5entry:
6  %cmp = icmp sgt i32 %maxval, %src
7  %cond = select i1 %cmp, i32 %src, i32 %maxval
8  ret i32 %cond
9}
10