llvm.org GIT mirror llvm / 08342f2
Revert "Disable codegen prepare critical edge splitting. Machine instruction passes now" This reverts revision 114633. It was breaking llvm-gcc-i386-linux-selfhost. It seems there is a downstream bug that is exposed by -cgp-critical-edge-splitting=0. When that bug is fixed, this patch can go back in. Note that the changes to tailcallfp2.ll are not reverted. They were good are required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114859 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 9 years ago
10 changed file(s) with 24 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
3030 #include "llvm/Transforms/Utils/BuildLibCalls.h"
3131 #include "llvm/ADT/DenseMap.h"
3232 #include "llvm/ADT/SmallSet.h"
33 #include "llvm/ADT/Statistic.h"
3433 #include "llvm/Assembly/Writer.h"
3534 #include "llvm/Support/CallSite.h"
3635 #include "llvm/Support/CommandLine.h"
4241 using namespace llvm;
4342 using namespace llvm::PatternMatch;
4443
45 STATISTIC(NumElim, "Number of blocks eliminated");
46
4744 static cl::opt
4845 CriticalEdgeSplit("cgp-critical-edge-splitting",
4946 cl::desc("Split critical edges during codegen prepare"),
50 cl::init(false), cl::Hidden);
47 cl::init(true), cl::Hidden);
5148
5249 namespace {
5350 class CodeGenPrepare : public FunctionPass {
304301 PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB));
305302 }
306303 BB->eraseFromParent();
307 ++NumElim;
308304
309305 DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
310306 }
623623 bb24: ; preds = %bb23
624624
625625 ; LSR should use count-down iteration to avoid requiring the trip count
626 ; in a register.
626 ; in a register, and it shouldn't require any reloads here.
627627
628628 ; CHECK: @ %bb24
629629 ; CHECK-NEXT: @ in Loop: Header=BB1_1 Depth=1
630 ; CHECK: subs [[REGISTER:(r[0-9]+)|(lr)]], #1
631 ; CHECK: bne.w
630 ; CHECK-NEXT: sub{{.*}} [[REGISTER:(r[0-9]+)|(lr)]], #1
631 ; CHECK-NEXT: bne.w
632632
633633 %92 = icmp eq i32 %tmp81, %indvar78 ; [#uses=1]
634634 %indvar.next79 = add i32 %indvar78, 1 ; [#uses=1]
99 define void @_Z19getClosestDiagonal3ii(%0* noalias sret, i32, i32) nounwind {
1010 ; CHECK: blx ___muldf3
1111 ; CHECK: blx ___muldf3
12 ; CHECK: beq LBB0_7
12 ; CHECK: beq LBB0_8
1313 ; CHECK: blx ___muldf3
1414 ;
1515 switch i32 %1, label %4 [
None ; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& grep {Number of block tails merged} | grep 16
0 ; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& grep {Number of block tails merged} | grep 9
11 ; PR1909
22
33 @.str = internal constant [48 x i8] c"transformed bounds: (%.2f, %.2f), (%.2f, %.2f)\0A\00" ; <[48 x i8]*> [#uses=1]
388388 ; rdar://7657764
389389
390390 ; CHECK: asd:
391 ; CHECK: BB9_4:
391 ; CHECK: BB9_5:
392392 ; CHECK-NEXT: addl (%r{{[^,]*}},%rdi,4), %e
393393 ; CHECK-NEXT: incq %rdi
394394 ; CHECK-NEXT: cmpq %rdi, %r{{[^,]*}}
463463
464464 ; And the one at %bb68, where we want to be sure to use superhero mode:
465465
466 ; CHECK: BB10_7:
466 ; CHECK: BB10_9:
467467 ; CHECK-NEXT: movaps 48(%r{{[^,]*}}), %xmm{{.*}}
468468 ; CHECK-NEXT: mulps %xmm{{.*}}, %xmm{{.*}}
469469 ; CHECK-NEXT: movaps 32(%r{{[^,]*}}), %xmm{{.*}}
483483 ; CHECK-NEXT: addq $64, %r{{.*}}
484484 ; CHECK-NEXT: addq $64, %r{{.*}}
485485 ; CHECK-NEXT: addq $-16, %r{{.*}}
486 ; CHECK-NEXT: BB10_10:
486487 ; CHECK-NEXT: cmpq $15, %r{{.*}}
487488 ; CHECK-NEXT: jg
488489
None ; RUN: llc < %s -march=x86 -stats |& grep {Number of blocks eliminated} | grep 6
1 ; PR1296
1 ; RUN: llc < %s -march=x86 | grep {movl \$1} | count 1
22
33 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
44 target triple = "i686-apple-darwin8"
None ; RUN: llc < %s -march=x86 | grep mov | count 4
0 ; RUN: llc < %s -march=x86 | grep mov | count 5
11 ; PR2659
22
33 define i32 @binomial(i32 %n, i32 %k) nounwind {
6767
6868 bb23: ; preds = %imix_test.exit
6969 unreachable
70 ; X86-32: %bb26.preheader
70 ; X86-32: %bb26.preheader.bb28_crit_edge
7171 ; X86-32: movl -16(%ebp),
7272 ; X86-32-NEXT: .align 4
7373 ; X86-32-NEXT: %bb28
None ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 4
0 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 5
11 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | FileCheck %s
22 ; PR2659
33
1313 %cmp44 = icmp eq i32 %k, 0 ; [#uses=1]
1414 br i1 %cmp44, label %afterfor, label %forbody
1515
16 ; CHECK: %forcond.preheader
16 ; CHECK: %forcond.preheader.forbody_crit_edge
1717 ; CHECK: movl $1
1818 ; CHECK-NOT: xorl
19 ; CHECK-NOT: movl
20 ; CHECK-NEXT: je
19 ; CHECK-NEXT: movl
2120
2221 ifthen: ; preds = %entry
2322 ret i32 0
152152 ; an unconditional jump to complete a two-way conditional branch.
153153
154154 ; CHECK: c_expand_expr_stmt:
155 ; CHECK: jmp .LBB3_11
156 ; CHECK-NEXT: .LBB3_9:
155 ; CHECK: jmp .LBB3_7
156 ; CHECK-NEXT: .LBB3_12:
157157 ; CHECK-NEXT: movq 8(%rax), %rax
158 ; CHECK-NEXT: xorb %dl, %dl
159158 ; CHECK-NEXT: movb 16(%rax), %al
160159 ; CHECK-NEXT: cmpb $16, %al
161 ; CHECK-NEXT: je .LBB3_11
160 ; CHECK-NEXT: je .LBB3_6
162161 ; CHECK-NEXT: cmpb $23, %al
163 ; CHECK-NEXT: jne .LBB3_14
164 ; CHECK-NEXT: .LBB3_11:
162 ; CHECK-NEXT: je .LBB3_6
163 ; CHECK-NEXT: jmp .LBB3_15
164 ; CHECK-NEXT: .LBB3_14:
165 ; CHECK-NEXT: cmpb $23, %bl
166 ; CHECK-NEXT: jne .LBB3_15
167 ; CHECK-NEXT: .LBB3_15:
165168
166169 %0 = type { %struct.rtx_def* }
167170 %struct.lang_decl = type opaque