summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/cmp-cmp.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-14 03:40:02 +0000
committerChris Lattner <sabre@nondot.org>2006-10-14 03:40:02 +0000
commit4c1984d9e81b685ab494f181cd85bc1063c91f32 (patch)
treef87011f91cea7eb6ac839ae0bf12cfcc96854574 /test/CodeGen/PowerPC/cmp-cmp.ll
parent8ac9d0ebdea49dedca3387fafa4e40e911d3269f (diff)
testcase for recent dag combiner patch. Before the entry bb was:
_test: stwu r1, -80(r1) stw r1, 76(r1) mflr r11 stw r11, 88(r1) rlwinm r2, r4, 0, 30, 31 cmplwi cr7, r2, 2 mfcr r2 rlwinm r2, r2, 30, 31, 31 cmplwi cr0, r2, 0 bne cr0, LBB1_2 ;UnifiedReturnBlock after it is: _test: stwu r1, -80(r1) stw r1, 76(r1) mflr r11 stw r11, 88(r1) rlwinm r2, r4, 0, 30, 31 cmplwi cr0, r2, 2 bgt cr0, LBB1_2 ;UnifiedReturnBlock git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/cmp-cmp.ll')
-rw-r--r--test/CodeGen/PowerPC/cmp-cmp.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/cmp-cmp.ll b/test/CodeGen/PowerPC/cmp-cmp.ll
new file mode 100644
index 00000000000..5a9e8e82694
--- /dev/null
+++ b/test/CodeGen/PowerPC/cmp-cmp.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=ppc32 &&
+; RUN: llvm-as < %s | llc -march=ppc32 | not grep mfcr
+
+void %test(long %X) {
+ %tmp1 = and long %X, 3 ; <long> [#uses=1]
+ %tmp = setgt long %tmp1, 2 ; <bool> [#uses=1]
+ br bool %tmp, label %UnifiedReturnBlock, label %cond_true
+
+cond_true: ; preds = %entry
+ tail call void %test(long 0)
+ ret void
+
+UnifiedReturnBlock: ; preds = %entry
+ ret void
+}
+