diff options
| author | Juergen Ributzka <juergen@apple.com> | 2014-03-20 19:55:52 +0000 |
|---|---|---|
| committer | Juergen Ributzka <juergen@apple.com> | 2014-03-20 19:55:52 +0000 |
| commit | 6dab520c70a25f43f288f9875faf1e8df5a80c3a (patch) | |
| tree | 58c38bc5fae1726785492a1b2ebda6fd74edad82 /llvm/test/CodeGen | |
| parent | b6118c5b1771d889d2bb6c63b45938769ac34755 (diff) | |
| download | bcm5719-llvm-6dab520c70a25f43f288f9875faf1e8df5a80c3a.tar.gz bcm5719-llvm-6dab520c70a25f43f288f9875faf1e8df5a80c3a.zip | |
[Constant Hoisting] Extend coverage of the constant hoisting pass.
This commit extends the coverage of the constant hoisting pass, adds additonal
debug output and updates the function names according to the style guide.
Related to <rdar://problem/16381500>
llvm-svn: 204389
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/lsr-interesting-step.ll | 14 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/negate-add-zero.ll | 17 |
2 files changed, 13 insertions, 18 deletions
diff --git a/llvm/test/CodeGen/X86/lsr-interesting-step.ll b/llvm/test/CodeGen/X86/lsr-interesting-step.ll index d4a7ac7da12..8ea3c53de41 100644 --- a/llvm/test/CodeGen/X86/lsr-interesting-step.ll +++ b/llvm/test/CodeGen/X86/lsr-interesting-step.ll @@ -3,26 +3,24 @@ ; The inner loop should require only one add (and no leas either). ; rdar://8100380 -; CHECK: BB0_3: -; CHECK-NEXT: movb $0, flags(%rdx) -; CHECK-NEXT: addq %rax, %rdx -; CHECK-NEXT: cmpq $8192, %rdx +; CHECK: BB0_2: +; CHECK-NEXT: movb $0, flags(%rcx) +; CHECK-NEXT: addq %rax, %rcx +; CHECK-NEXT: cmpq $8192, %rcx ; CHECK-NEXT: jl @flags = external global [8192 x i8], align 16 ; <[8192 x i8]*> [#uses=1] define void @foo() nounwind { entry: - %tmp = icmp slt i64 2, 8192 ; <i1> [#uses=1] - br i1 %tmp, label %bb, label %bb21 + br label %bb bb: ; preds = %entry br label %bb7 bb7: ; preds = %bb, %bb17 %tmp8 = phi i64 [ %tmp18, %bb17 ], [ 2, %bb ] ; <i64> [#uses=2] - %tmp9 = icmp slt i64 2, 8192 ; <i1> [#uses=1] - br i1 %tmp9, label %bb10, label %bb17 + br label %bb10 bb10: ; preds = %bb7 br label %bb11 diff --git a/llvm/test/CodeGen/X86/negate-add-zero.ll b/llvm/test/CodeGen/X86/negate-add-zero.ll index 92850f22eaa..c961bd091b9 100644 --- a/llvm/test/CodeGen/X86/negate-add-zero.ll +++ b/llvm/test/CodeGen/X86/negate-add-zero.ll @@ -827,9 +827,7 @@ declare void @_ZN11MatrixTools9transposeI11FixedMatrixIdLi6ELi6ELi0ELi0EEEENT_13 declare void @_ZN21HNodeTranslateRotate311toCartesianEv(%struct.HNodeTranslateRotate3*) define linkonce void @_ZN21HNodeTranslateRotate36setVelERK9CDSVectorIdLi1EN3CDS12DefaultAllocEE(%struct.HNodeTranslateRotate3* %this, %"struct.CDSVector<double,0,CDS::DefaultAlloc>"* %velv) { -entry: - %0 = add i32 0, -1 ; <i32> [#uses=1] - %1 = getelementptr double* null, i32 %0 ; <double*> [#uses=1] + %1 = getelementptr double* null, i32 -1 ; <double*> [#uses=1] %2 = load double* %1, align 8 ; <double> [#uses=1] %3 = load double* null, align 8 ; <double> [#uses=2] %4 = load double* null, align 8 ; <double> [#uses=2] @@ -890,13 +888,12 @@ entry: store double %52, double* %55, align 8 %56 = getelementptr %struct.HNodeTranslateRotate3* %this, i32 0, i32 0, i32 10, i32 0, i32 0, i32 2 ; <double*> [#uses=1] store double %53, double* %56, align 8 - %57 = add i32 0, 4 ; <i32> [#uses=1] - %58 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 0 ; <%"struct.CDSVector<double,0,CDS::DefaultAlloc>"**> [#uses=1] - store %"struct.CDSVector<double,0,CDS::DefaultAlloc>"* %velv, %"struct.CDSVector<double,0,CDS::DefaultAlloc>"** %58, align 8 - %59 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 1 ; <i32*> [#uses=1] - store i32 %57, i32* %59, align 4 - %60 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 2 ; <i32*> [#uses=1] - store i32 3, i32* %60, align 8 + %57 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 0 ; <%"struct.CDSVector<double,0,CDS::DefaultAlloc>"**> [#uses=1] + store %"struct.CDSVector<double,0,CDS::DefaultAlloc>"* %velv, %"struct.CDSVector<double,0,CDS::DefaultAlloc>"** %57, align 8 + %58 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 1 ; <i32*> [#uses=1] + store i32 4, i32* %58, align 4 + %59 = getelementptr %"struct.SubVector<CDSVector<double, 1, CDS::DefaultAlloc> >"* null, i32 0, i32 2 ; <i32*> [#uses=1] + store i32 3, i32* %59, align 8 unreachable } |

