[PATCH] D132657: [DSE] Eliminate noop store even through has clobbering between LoadI and StoreI
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 00:18:39 PDT 2022
StephenFan added a comment.
In D132657#3840493 <https://reviews.llvm.org/D132657#3840493>, @aeubanks wrote:
> reduced test case
>
> define void @f(ptr %arg, ptr %arg1, i1 %arg2) {
> bb:
> %tmp = load ptr, ptr %arg, align 8
> %tmp3 = load ptr, ptr %arg1, align 8
> store ptr %tmp3, ptr %arg, align 8
> store ptr %tmp, ptr %arg1, align 8
> br i1 %arg2, label %bb5, label %bb6
>
> bb5:
> store ptr %tmp, ptr %arg, align 8 ; this store is incorrectly removed
> store ptr %tmp3, ptr %arg1, align 8
> ret void
>
> bb6:
> ret void
> }
>
> we're first swapping the values `%arg` and `%arg1` point to, then conditionally swapping them back to their original values
>
> will revert
Thanks for providing a reduced test case!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132657/new/
https://reviews.llvm.org/D132657
More information about the llvm-commits
mailing list