diff options
| author | James Molloy <james.molloy@arm.com> | 2016-08-31 10:46:45 +0000 |
|---|---|---|
| committer | James Molloy <james.molloy@arm.com> | 2016-08-31 10:46:45 +0000 |
| commit | 171fdac7ced51500b9cde465afe5b7f8ac832fe1 (patch) | |
| tree | 7dbb8af8226ce8f47801bfb4536be94dd5094b45 /llvm/test/Transforms | |
| parent | 8e69b032e5e13e1f8f9ebd8e1ee20643b6e6bf8b (diff) | |
| download | bcm5719-llvm-171fdac7ced51500b9cde465afe5b7f8ac832fe1.tar.gz bcm5719-llvm-171fdac7ced51500b9cde465afe5b7f8ac832fe1.zip | |
[SimplifyCFG] Add a workaround to fix PR30188
We're sinking stores, which is a good thing, but in the process creating selects for the store address operand, which SROA/Mem2Reg can't look through, which caused serious regressions.
The real fix is in SROA, which I'll be looking into.
llvm-svn: 280219
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/SimplifyCFG/sink-common-code.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll b/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll index 1a4884a6454..9f87d3bf3c5 100644 --- a/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll +++ b/llvm/test/Transforms/SimplifyCFG/sink-common-code.ll @@ -537,6 +537,29 @@ if.end: ; CHECK-DAG: [ %cmp3, %if.then3 ] ; CHECK-NEXT: zext i1 %[[x]] to i8 +define i32 @test_pr30188(i1 zeroext %flag, i32 %x) { +entry: + %y = alloca i32 + %z = alloca i32 + br i1 %flag, label %if.then, label %if.else + +if.then: + store i32 %x, i32* %y + br label %if.end + +if.else: + store i32 %x, i32* %z + br label %if.end + +if.end: + ret i32 1 +} + +; CHECK-LABEL: test_pr30188 +; CHECK-NOT: select +; CHECK: store +; CHECK: store + ; CHECK: !0 = !{!1, !1, i64 0} ; CHECK: !1 = !{!"float", !2} ; CHECK: !2 = !{!"an example type tree"} |

