summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/fast-isel-const.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit67c32a98315f785a9ec9d531c1f571a0196c7463 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /test/CodeGen/PowerPC/fast-isel-const.ll
parent9f61947910e6ab40de38e6b4034751ef1513200f (diff)
Diffstat (limited to 'test/CodeGen/PowerPC/fast-isel-const.ll')
-rw-r--r--test/CodeGen/PowerPC/fast-isel-const.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/fast-isel-const.ll b/test/CodeGen/PowerPC/fast-isel-const.ll
new file mode 100644
index 0000000000000..1057d0a0ce2b7
--- /dev/null
+++ b/test/CodeGen/PowerPC/fast-isel-const.ll
@@ -0,0 +1,27 @@
+; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s --check-prefix=ELF64
+
+define zeroext i1 @testi1(i8 %in) nounwind uwtable ssp {
+entry:
+ %c = icmp eq i8 %in, 5
+ br i1 %c, label %true, label %false
+
+; ELF64-LABEL: @testi1
+
+true:
+ br label %end
+
+; ELF64-NOT: li {{[0-9]+}}, -1
+; ELF64: li {{[0-9]+}}, 1
+
+false:
+ br label %end
+
+; ELF64: li {{[0-9]+}}, 0
+
+end:
+ %r = phi i1 [ 0, %false], [ 1, %true ]
+ ret i1 %r
+
+; ELF64: blr
+}
+