[PATCH] D124247: [Trivial Dead] Consider any non volatile load as trivially dead independent on ordering
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 13:24:49 PDT 2022
efriedma added a comment.
I think I wrote it backwards. Say you have something like the following:
// thread 1
store seq_cst 1, %a
// thread 2
%load1 = load monotonic %a
%load2 = load seq_cst %a
if (%load1 == 1) {
// If %load1 produces 1, %load2 must also produce 1.
// So %load2 acts as an acquire barrier.
}
In this example, I think it isn't legal to erase %load2.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124247/new/
https://reviews.llvm.org/D124247
More information about the llvm-commits
mailing list