2009-09-09 02:09:15 +02:00
|
|
|
; RUN: llc < %s -march=ppc32 | not grep mfcr
|
2008-03-25 05:26:08 +01:00
|
|
|
|
|
|
|
define void @test(i64 %X) {
|
|
|
|
%tmp1 = and i64 %X, 3 ; <i64> [#uses=1]
|
|
|
|
%tmp = icmp sgt i64 %tmp1, 2 ; <i1> [#uses=1]
|
|
|
|
br i1 %tmp, label %UnifiedReturnBlock, label %cond_true
|
|
|
|
cond_true: ; preds = %0
|
|
|
|
tail call void @test( i64 0 )
|
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
llvm-svn: 30954
2006-10-14 05:40:02 +02:00
|
|
|
ret void
|
2008-03-25 05:26:08 +01:00
|
|
|
UnifiedReturnBlock: ; preds = %0
|
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
llvm-svn: 30954
2006-10-14 05:40:02 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|