[PATCH] D132657: [DSE] Eliminate noop store even through has clobbering between LoadI and StoreI
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 10:29:22 PDT 2022
aeubanks added a comment.
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
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