diff options
Diffstat (limited to 'test/CodeGen/Hexagon/maxd.ll')
| -rw-r--r-- | test/CodeGen/Hexagon/maxd.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/maxd.ll b/test/CodeGen/Hexagon/maxd.ll new file mode 100644 index 0000000000000..7f237fd54e7ad --- /dev/null +++ b/test/CodeGen/Hexagon/maxd.ll @@ -0,0 +1,9 @@ +; RUN: llc -march=hexagon < %s | FileCheck %s +; CHECK: max + +define i64 @f(i64 %src, i64 %maxval) nounwind readnone { +entry: + %cmp = icmp slt i64 %maxval, %src + %cond = select i1 %cmp, i64 %src, i64 %maxval + ret i64 %cond +} |
