summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/maxud.ll
diff options
context:
space:
mode:
authorColin LeMahieu <colinl@codeaurora.org>2015-06-17 20:29:33 +0000
committerColin LeMahieu <colinl@codeaurora.org>2015-06-17 20:29:33 +0000
commitbb71f7d25106b366a31ab74d8c03eeda99d6a64f (patch)
tree5c754fda70ef5942c3c8b77d571dbf0687cb1924 /llvm/test/CodeGen/Hexagon/maxud.ll
parent35c1df5cb6da27be25a4d75ac811f0b4e3cbeb54 (diff)
downloadbcm5719-llvm-bb71f7d25106b366a31ab74d8c03eeda99d6a64f.tar.gz
bcm5719-llvm-bb71f7d25106b366a31ab74d8c03eeda99d6a64f.zip
[Hexagon] Adding a number of other tests for min/max instructions and loading i1s.
llvm-svn: 239935
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/maxud.ll')
-rw-r--r--llvm/test/CodeGen/Hexagon/maxud.ll9
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
+}
OpenPOWER on IntegriCloud