diff options
author | Reid Kleckner <rnk@google.com> | 2016-08-15 15:42:31 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-08-15 15:42:31 +0000 |
commit | 70a600b8bbb9243a60b33326b4bb44d4c3cd923e (patch) | |
tree | 3c2d7c13fa3c93eedf5aa13d3f5283580e577b87 /llvm/test/Transforms | |
parent | 67f22ee24a71627bab039927c58c345ed06370c7 (diff) | |
download | bcm5719-llvm-70a600b8bbb9243a60b33326b4bb44d4c3cd923e.tar.gz bcm5719-llvm-70a600b8bbb9243a60b33326b4bb44d4c3cd923e.zip |
Revert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"
This reverts commit r278660.
It causes downstream assertion failure in InstCombine on shuffle
instructions. Comes up in __mm_swizzle_epi32.
llvm-svn: 278672
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll | 3 | ||||
-rw-r--r-- | llvm/test/Transforms/SimplifyCFG/sink-common-code.ll | 177 |
2 files changed, 1 insertions, 179 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll b/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll index 7144da2d4bc..cfbe219c4c2 100644 --- a/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll +++ b/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll @@ -29,8 +29,7 @@ if.else: ; preds = %entry %4 = load double, double* %a, align 8 %mul1 = fmul fast double %1, %4 %sub1 = fsub fast double %mul1, %0 - %gep1 = getelementptr double, double* %y, i32 1 - store double %sub1, double* %gep1, align 8 + store double %sub1, double* %y, align 8 br label %if.end if.end: ; preds = %if.else, %if.then diff --git a/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll b/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll index 4277ae0e33a..cdb6ed29d85 100644 --- a/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll +++ b/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll @@ -81,180 +81,3 @@ if.end: ; CHECK: call ; CHECK: add ; CHECK-NOT: br - -define i32 @test4(i1 zeroext %flag, i32 %x, i32* %y) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - %a = add i32 %x, 5 - store i32 %a, i32* %y - br label %if.end - -if.else: - %b = add i32 %x, 7 - store i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test4 -; CHECK: select -; CHECK: store -; CHECK-NOT: store - -define i32 @test5(i1 zeroext %flag, i32 %x, i32* %y) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - %a = add i32 %x, 5 - store volatile i32 %a, i32* %y - br label %if.end - -if.else: - %b = add i32 %x, 7 - store i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test5 -; CHECK: store volatile -; CHECK: store - -define i32 @test6(i1 zeroext %flag, i32 %x, i32* %y) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - %a = add i32 %x, 5 - store volatile i32 %a, i32* %y - br label %if.end - -if.else: - %b = add i32 %x, 7 - store volatile i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test6 -; CHECK: select -; CHECK: store volatile -; CHECK-NOT: store - -define i32 @test7(i1 zeroext %flag, i32 %x, i32* %y) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - %z = load volatile i32, i32* %y - %a = add i32 %z, 5 - store volatile i32 %a, i32* %y - br label %if.end - -if.else: - %w = load volatile i32, i32* %y - %b = add i32 %w, 7 - store volatile i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test7 -; CHECK-DAG: select -; CHECK-DAG: load volatile -; CHECK: store volatile -; CHECK-NOT: load -; CHECK-NOT: store - -; %z and %w are in different blocks. We shouldn't sink the add because -; there may be intervening memory instructions. -define i32 @test8(i1 zeroext %flag, i32 %x, i32* %y) { -entry: - %z = load volatile i32, i32* %y - br i1 %flag, label %if.then, label %if.else - -if.then: - %a = add i32 %z, 5 - store volatile i32 %a, i32* %y - br label %if.end - -if.else: - %w = load volatile i32, i32* %y - %b = add i32 %w, 7 - store volatile i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test8 -; CHECK: add -; CHECK: add - -; The extra store in %if.then means %z and %w are not equivalent. -define i32 @test9(i1 zeroext %flag, i32 %x, i32* %y, i32* %p) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - store i32 7, i32* %p - %z = load volatile i32, i32* %y - store i32 6, i32* %p - %a = add i32 %z, 5 - store volatile i32 %a, i32* %y - br label %if.end - -if.else: - %w = load volatile i32, i32* %y - %b = add i32 %w, 7 - store volatile i32 %b, i32* %y - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test9 -; CHECK: add -; CHECK: add - -%struct.anon = type { i32, i32 } - -; The GEP indexes a struct type so cannot have a variable last index. -define i32 @test10(i1 zeroext %flag, i32 %x, i32* %y, %struct.anon* %s) { -entry: - br i1 %flag, label %if.then, label %if.else - -if.then: - %dummy = add i32 %x, 5 - %gepa = getelementptr inbounds %struct.anon, %struct.anon* %s, i32 0, i32 0 - store volatile i32 %x, i32* %gepa - br label %if.end - -if.else: - %dummy1 = add i32 %x, 6 - %gepb = getelementptr inbounds %struct.anon, %struct.anon* %s, i32 0, i32 1 - store volatile i32 %x, i32* %gepb - br label %if.end - -if.end: - ret i32 1 -} - -; CHECK-LABEL: test10 -; CHECK: getelementptr -; CHECK: getelementptr -; CHECK: phi -; CHECK: store volatile |