[llvm-branch-commits] [llvm-branch] r223643 - Fix merge conflict & minor test output differences
David Majnemer
david.majnemer at gmail.com
Mon Dec 8 01:10:58 PST 2014
Author: majnemer
Date: Mon Dec 8 03:10:57 2014
New Revision: 223643
URL: http://llvm.org/viewvc/llvm-project?rev=223643&view=rev
Log:
Fix merge conflict & minor test output differences
Modified:
llvm/branches/release_35/test/Transforms/SROA/phi-and-select.ll
Modified: llvm/branches/release_35/test/Transforms/SROA/phi-and-select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/test/Transforms/SROA/phi-and-select.ll?rev=223643&r1=223642&r2=223643&view=diff
==============================================================================
--- llvm/branches/release_35/test/Transforms/SROA/phi-and-select.ll (original)
+++ llvm/branches/release_35/test/Transforms/SROA/phi-and-select.ll Mon Dec 8 03:10:57 2014
@@ -502,71 +502,6 @@ end:
; CHECK: ret float %[[phi]]
}
-; Verifies we fixed PR20425. We should be able to promote all alloca's to
-; registers in this test.
-;
-; %0 = slice
-; %1 = slice
-; %2 = phi(%0, %1) // == slice
-define float @simplify_phi_nodes_that_equal_slice(i1 %cond, float* %temp) {
-; CHECK-LABEL: @simplify_phi_nodes_that_equal_slice(
-entry:
- %arr = alloca [4 x float], align 4
-; CHECK-NOT: alloca
- br i1 %cond, label %then, label %else
-
-then:
- %0 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
- store float 1.000000e+00, float* %0, align 4
- br label %merge
-
-else:
- %1 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
- store float 2.000000e+00, float* %1, align 4
- br label %merge
-
-merge:
- %2 = phi float* [ %0, %then ], [ %1, %else ]
- store float 0.000000e+00, float* %temp, align 4
- %3 = load float* %2, align 4
- ret float %3
-}
-
-; A slightly complicated example for PR20425.
-;
-; %0 = slice
-; %1 = phi(%0) // == slice
-; %2 = slice
-; %3 = phi(%1, %2) // == slice
-define float @simplify_phi_nodes_that_equal_slice_2(i1 %cond, float* %temp) {
-; CHECK-LABEL: @simplify_phi_nodes_that_equal_slice_2(
-entry:
- %arr = alloca [4 x float], align 4
-; CHECK-NOT: alloca
- br i1 %cond, label %then, label %else
-
-then:
- %0 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
- store float 1.000000e+00, float* %0, align 4
- br label %then2
-
-then2:
- %1 = phi float* [ %0, %then ]
- store float 2.000000e+00, float* %1, align 4
- br label %merge
-
-else:
- %2 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
- store float 3.000000e+00, float* %2, align 4
- br label %merge
-
-merge:
- %3 = phi float* [ %1, %then2 ], [ %2, %else ]
- store float 0.000000e+00, float* %temp, align 4
- %4 = load float* %3, align 4
- ret float %4
-}
-
%struct.S = type { i32 }
; Verifies we fixed PR20822. We have a foldable PHI feeding a speculatable PHI
@@ -579,6 +514,7 @@ define void @PR20822() {
entry:
%f = alloca %struct.S, align 4
; CHECK: %[[alloca:.*]] = alloca
+; CHECK: %[[cast:.*]] = bitcast i32* %[[alloca]] to %struct.S*
br i1 undef, label %if.end, label %for.cond
for.cond: ; preds = %for.cond, %entry
@@ -586,8 +522,8 @@ for.cond:
if.end: ; preds = %for.cond, %entry
%f2 = phi %struct.S* [ %f, %entry ], [ %f, %for.cond ]
+; CHECK: phi {{.*}} %[[cast]]
; CHECK: phi i32
-; CHECK: %[[cast:.*]] = bitcast i32* %[[alloca]] to %struct.S*
phi i32 [ undef, %entry ], [ undef, %for.cond ]
br i1 undef, label %if.then5, label %if.then2
@@ -596,7 +532,6 @@ if.then2:
if.then5: ; preds = %if.then2, %if.end
%f1 = phi %struct.S* [ undef, %if.then2 ], [ %f2, %if.end ]
-; CHECK: phi {{.*}} %[[cast]]
store %struct.S undef, %struct.S* %f1, align 4
ret void
}
More information about the llvm-branch-commits
mailing list