diff options
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/maxud.ll')
-rw-r--r-- | llvm/test/CodeGen/Hexagon/maxud.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/maxud.ll b/llvm/test/CodeGen/Hexagon/maxud.ll new file mode 100644 index 00000000000..eca4faee602 --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/maxud.ll @@ -0,0 +1,9 @@ +; RUN: llc -march=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 +} |