aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Hexagon/expand-condsets-basic.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Hexagon/expand-condsets-basic.ll')
-rw-r--r--test/CodeGen/Hexagon/expand-condsets-basic.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/expand-condsets-basic.ll b/test/CodeGen/Hexagon/expand-condsets-basic.ll
new file mode 100644
index 0000000..16fe8af
--- /dev/null
+++ b/test/CodeGen/Hexagon/expand-condsets-basic.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=hexagon < %s | FileCheck %s
+; CHECK: if{{.*}}add
+; CHECK: if{{.*}}sub
+
+define i32 @foo (i1 %a, i32 %b, i32 %c, i32 %d) nounwind {
+ %1 = add i32 %b, %d
+ %2 = sub i32 %c, %d
+ %3 = select i1 %a, i32 %1, i32 %2
+ ret i32 %3
+}
+