diff options
Diffstat (limited to 'test/CodeGen/Hexagon/maxw.ll')
-rw-r--r-- | test/CodeGen/Hexagon/maxw.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/maxw.ll b/test/CodeGen/Hexagon/maxw.ll new file mode 100644 index 000000000000..e66ca958806f --- /dev/null +++ b/test/CodeGen/Hexagon/maxw.ll @@ -0,0 +1,9 @@ +; 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 +} |