aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/Hexagon/maxud.ll
blob: 01d1ed2987c90b3bcd4c88ecd8befac7625b48a3 (plain)
1
2
3
4
5
6
7
8
9
; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; CHECK: maxu

define i64 @f(i64 %src, i64 %maxval) nounwind readnone {
entry:
  %cmp = icmp ult i64 %maxval, %src
  %cond = select i1 %cmp, i64 %src, i64 %maxval
  ret i64 %cond
}