[PATCH] D132365: [DSE] Support looking through memory phis at end of function.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 03:55:33 PDT 2022
nikic added inline comments.
================
Comment at: llvm/test/Transforms/DeadStoreElimination/multiblock-loop-carried-dependence.ll:9
; Test cases with a loop carried dependence in %loop.2, where %l.2 reads the
; value stored by the previous iteration. Hence, the store in %loop.2 is not
----------------
Comment is confusing because there is no `%l.2`.
================
Comment at: llvm/test/Transforms/DeadStoreElimination/multiblock-loop-carried-dependence.ll:34
-; CHECK-NEXT: [[PTR_IV_2_ADD_1:%.*]] = getelementptr inbounds [100 x i32], [100 x i32]* [[A]], i64 0, i64 [[ADD]]
-; CHECK-NEXT: store i32 10, i32* [[PTR_IV_2_ADD_1]], align 4
; CHECK-NEXT: [[L_1:%.*]] = load i32, i32* [[PTR_IV_2]], align 4
----------------
Isn't this exactly the miscompile we want to prevent? The store is to `A[iv.2 + 1]`, which will be read as `A[iv.2]` on the next iteration?
================
Comment at: llvm/test/Transforms/DeadStoreElimination/phi-translation.ll:159
; TODO: The store in %entry can be removed by translating %p through the phi.
define void @memoryphi_translate_5(i1 %cond) {
----------------
Drop TODO
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132365/new/
https://reviews.llvm.org/D132365
More information about the llvm-commits
mailing list