llvm.org GIT mirror llvm / 7eb589d
Try again to disable critical edge splitting in CodeGenPrepare. The bug that broke i386 linux has been fixed in r115191. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115204 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 9 years ago
10 changed file(s) with 24 addition(s) and 23 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"
3334 #include "llvm/Assembly/Writer.h"
3435 #include "llvm/Support/CallSite.h"
3536 #include "llvm/Support/CommandLine.h"
4142 using namespace llvm;
4243 using namespace llvm::PatternMatch;
4344
45 STATISTIC(NumElim, "Number of blocks eliminated");
46
4447 static cl::opt
4548 CriticalEdgeSplit("cgp-critical-edge-splitting",
4649 cl::desc("Split critical edges during codegen prepare"),
47 cl::init(true), cl::Hidden);
50 cl::init(false), cl::Hidden);
4851
4952 namespace {
5053 class CodeGenPrepare : public FunctionPass {
301304 PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB));
302305 }
303306 BB->eraseFromParent();
307 ++NumElim;
304308
305309 DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
306310 }
623623 bb24: ; preds = %bb23
624624
625625 ; LSR should use count-down iteration to avoid requiring the trip count
626 ; in a register, and it shouldn't require any reloads here.
626 ; in a register.
627627
628628 ; CHECK: @ %bb24
629629 ; CHECK: subs{{.*}} [[REGISTER:(r[0-9]+)|(lr)]], #1
630 ; CHECK-NEXT: bne.w
630 ; CHECK: bne.w
631631
632632 %92 = icmp eq i32 %tmp81, %indvar78 ; [#uses=1]
633633 %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_8
12 ; CHECK: beq LBB0_7
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 9
0 ; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& grep {Number of block tails merged} | grep 16
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_5:
391 ; CHECK: BB9_4:
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_9:
466 ; CHECK: BB10_7:
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:
487486 ; CHECK-NEXT: cmpq $15, %r{{.*}}
488487 ; CHECK-NEXT: jg
489488
0 ; 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 5
0 ; RUN: llc < %s -march=x86 | grep mov | count 4
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.bb28_crit_edge
70 ; X86-32: %bb26.preheader
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 5
0 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 4
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.forbody_crit_edge
16 ; CHECK: %forcond.preheader
1717 ; CHECK: movl $1
1818 ; CHECK-NOT: xorl
19 ; CHECK-NEXT: movl
19 ; CHECK-NOT: movl
20 ; CHECK-NEXT: je
2021
2122 ifthen: ; preds = %entry
2223 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_7
156 ; CHECK-NEXT: .LBB3_12:
155 ; CHECK: jmp .LBB3_11
156 ; CHECK-NEXT: .LBB3_9:
157157 ; CHECK-NEXT: movq 8(%rax), %rax
158 ; CHECK-NEXT: xorb %dl, %dl
158159 ; CHECK-NEXT: movb 16(%rax), %al
159160 ; CHECK-NEXT: cmpb $16, %al
160 ; CHECK-NEXT: je .LBB3_6
161 ; CHECK-NEXT: je .LBB3_11
161162 ; CHECK-NEXT: cmpb $23, %al
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:
163 ; CHECK-NEXT: jne .LBB3_14
164 ; CHECK-NEXT: .LBB3_11:
168165
169166 %0 = type { %struct.rtx_def* }
170167 %struct.lang_decl = type opaque