[llvm-commits] [llvm] r114859 - in /llvm/trunk: lib/Transforms/Scalar/CodeGenPrepare.cpp test/CodeGen/ARM/lsr-on-unrolled-loops.ll test/CodeGen/Thumb/2010-07-15-debugOrdering.ll test/CodeGen/X86/2008-02-18-TailMergingBug.ll test/CodeGen/X86/lsr-reuse.ll test/CodeGen/X86/phi-immediate-factoring.ll test/CodeGen/X86/phys_subreg_coalesce-2.ll test/CodeGen/X86/postra-licm.ll test/CodeGen/X86/pr2659.ll test/CodeGen/X86/tail-opts.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Sep 27 11:43:48 PDT 2010
Author: stoklund
Date: Mon Sep 27 13:43:48 2010
New Revision: 114859
URL: http://llvm.org/viewvc/llvm-project?rev=114859&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
llvm/trunk/test/CodeGen/ARM/lsr-on-unrolled-loops.ll
llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
llvm/trunk/test/CodeGen/X86/2008-02-18-TailMergingBug.ll
llvm/trunk/test/CodeGen/X86/lsr-reuse.ll
llvm/trunk/test/CodeGen/X86/phi-immediate-factoring.ll
llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce-2.ll
llvm/trunk/test/CodeGen/X86/postra-licm.ll
llvm/trunk/test/CodeGen/X86/pr2659.ll
llvm/trunk/test/CodeGen/X86/tail-opts.ll
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Sep 27 13:43:48 2010
@@ -31,7 +31,6 @@
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallSet.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/CommandLine.h"
@@ -43,12 +42,10 @@
using namespace llvm;
using namespace llvm::PatternMatch;
-STATISTIC(NumElim, "Number of blocks eliminated");
-
static cl::opt<bool>
CriticalEdgeSplit("cgp-critical-edge-splitting",
cl::desc("Split critical edges during codegen prepare"),
- cl::init(false), cl::Hidden);
+ cl::init(true), cl::Hidden);
namespace {
class CodeGenPrepare : public FunctionPass {
@@ -305,7 +302,6 @@
PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB));
}
BB->eraseFromParent();
- ++NumElim;
DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
}
Modified: llvm/trunk/test/CodeGen/ARM/lsr-on-unrolled-loops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/lsr-on-unrolled-loops.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/lsr-on-unrolled-loops.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/lsr-on-unrolled-loops.ll Mon Sep 27 13:43:48 2010
@@ -624,12 +624,12 @@
bb24: ; preds = %bb23
; LSR should use count-down iteration to avoid requiring the trip count
-; in a register.
+; in a register, and it shouldn't require any reloads here.
; CHECK: @ %bb24
; CHECK-NEXT: @ in Loop: Header=BB1_1 Depth=1
-; CHECK: subs [[REGISTER:(r[0-9]+)|(lr)]], #1
-; CHECK: bne.w
+; CHECK-NEXT: sub{{.*}} [[REGISTER:(r[0-9]+)|(lr)]], #1
+; CHECK-NEXT: bne.w
%92 = icmp eq i32 %tmp81, %indvar78 ; <i1> [#uses=1]
%indvar.next79 = add i32 %indvar78, 1 ; <i32> [#uses=1]
Modified: llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll Mon Sep 27 13:43:48 2010
@@ -10,7 +10,7 @@
define void @_Z19getClosestDiagonal3ii(%0* noalias sret, i32, i32) nounwind {
; CHECK: blx ___muldf3
; CHECK: blx ___muldf3
-; CHECK: beq LBB0_7
+; CHECK: beq LBB0_8
; CHECK: blx ___muldf3
; <label>:3
switch i32 %1, label %4 [
Modified: llvm/trunk/test/CodeGen/X86/2008-02-18-TailMergingBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-02-18-TailMergingBug.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-02-18-TailMergingBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-02-18-TailMergingBug.ll Mon Sep 27 13:43:48 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& grep {Number of block tails merged} | grep 16
+; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& grep {Number of block tails merged} | grep 9
; PR1909
@.str = internal constant [48 x i8] c"transformed bounds: (%.2f, %.2f), (%.2f, %.2f)\0A\00" ; <[48 x i8]*> [#uses=1]
Modified: llvm/trunk/test/CodeGen/X86/lsr-reuse.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-reuse.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lsr-reuse.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lsr-reuse.ll Mon Sep 27 13:43:48 2010
@@ -389,7 +389,7 @@
; rdar://7657764
; CHECK: asd:
-; CHECK: BB9_4:
+; CHECK: BB9_5:
; CHECK-NEXT: addl (%r{{[^,]*}},%rdi,4), %e
; CHECK-NEXT: incq %rdi
; CHECK-NEXT: cmpq %rdi, %r{{[^,]*}}
@@ -464,7 +464,7 @@
; And the one at %bb68, where we want to be sure to use superhero mode:
-; CHECK: BB10_7:
+; CHECK: BB10_9:
; CHECK-NEXT: movaps 48(%r{{[^,]*}}), %xmm{{.*}}
; CHECK-NEXT: mulps %xmm{{.*}}, %xmm{{.*}}
; CHECK-NEXT: movaps 32(%r{{[^,]*}}), %xmm{{.*}}
@@ -484,6 +484,7 @@
; CHECK-NEXT: addq $64, %r{{.*}}
; CHECK-NEXT: addq $64, %r{{.*}}
; CHECK-NEXT: addq $-16, %r{{.*}}
+; CHECK-NEXT: BB10_10:
; CHECK-NEXT: cmpq $15, %r{{.*}}
; CHECK-NEXT: jg
Modified: llvm/trunk/test/CodeGen/X86/phi-immediate-factoring.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phi-immediate-factoring.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/phi-immediate-factoring.ll (original)
+++ llvm/trunk/test/CodeGen/X86/phi-immediate-factoring.ll Mon Sep 27 13:43:48 2010
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86 -stats |& grep {Number of blocks eliminated} | grep 6
; PR1296
+; RUN: llc < %s -march=x86 | grep {movl \$1} | count 1
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"
target triple = "i686-apple-darwin8"
Modified: llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce-2.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce-2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce-2.ll Mon Sep 27 13:43:48 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep mov | count 4
+; RUN: llc < %s -march=x86 | grep mov | count 5
; PR2659
define i32 @binomial(i32 %n, i32 %k) nounwind {
Modified: llvm/trunk/test/CodeGen/X86/postra-licm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/postra-licm.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/postra-licm.ll (original)
+++ llvm/trunk/test/CodeGen/X86/postra-licm.ll Mon Sep 27 13:43:48 2010
@@ -68,7 +68,7 @@
bb23: ; preds = %imix_test.exit
unreachable
-; X86-32: %bb26.preheader
+; X86-32: %bb26.preheader.bb28_crit_edge
; X86-32: movl -16(%ebp),
; X86-32-NEXT: .align 4
; X86-32-NEXT: %bb28
Modified: llvm/trunk/test/CodeGen/X86/pr2659.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr2659.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr2659.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pr2659.ll Mon Sep 27 13:43:48 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 4
+; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 5
; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | FileCheck %s
; PR2659
@@ -14,11 +14,10 @@
%cmp44 = icmp eq i32 %k, 0 ; <i1> [#uses=1]
br i1 %cmp44, label %afterfor, label %forbody
-; CHECK: %forcond.preheader
+; CHECK: %forcond.preheader.forbody_crit_edge
; CHECK: movl $1
; CHECK-NOT: xorl
-; CHECK-NOT: movl
-; CHECK-NEXT: je
+; CHECK-NEXT: movl
ifthen: ; preds = %entry
ret i32 0
Modified: llvm/trunk/test/CodeGen/X86/tail-opts.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tail-opts.ll?rev=114859&r1=114858&r2=114859&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/tail-opts.ll (original)
+++ llvm/trunk/test/CodeGen/X86/tail-opts.ll Mon Sep 27 13:43:48 2010
@@ -153,16 +153,19 @@
; an unconditional jump to complete a two-way conditional branch.
; CHECK: c_expand_expr_stmt:
-; CHECK: jmp .LBB3_11
-; CHECK-NEXT: .LBB3_9:
+; CHECK: jmp .LBB3_7
+; CHECK-NEXT: .LBB3_12:
; CHECK-NEXT: movq 8(%rax), %rax
-; CHECK-NEXT: xorb %dl, %dl
; CHECK-NEXT: movb 16(%rax), %al
; CHECK-NEXT: cmpb $16, %al
-; CHECK-NEXT: je .LBB3_11
+; CHECK-NEXT: je .LBB3_6
; CHECK-NEXT: cmpb $23, %al
-; CHECK-NEXT: jne .LBB3_14
-; CHECK-NEXT: .LBB3_11:
+; CHECK-NEXT: je .LBB3_6
+; CHECK-NEXT: jmp .LBB3_15
+; CHECK-NEXT: .LBB3_14:
+; CHECK-NEXT: cmpb $23, %bl
+; CHECK-NEXT: jne .LBB3_15
+; CHECK-NEXT: .LBB3_15:
%0 = type { %struct.rtx_def* }
%struct.lang_decl = type opaque
More information about the llvm-commits
mailing list