[llvm] [MemDep] Use EarliestEscapeInfo (PR #69727)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 00:52:05 PDT 2023
nikic wrote:
@ZequanWu I looked at the test case, and I don't think this is a miscompile. The faulting load just gets optimized away.
The code uses the pattern
```
int buffer0_contents = *buffer0;
EXPECT_EQ(buffer0_contents, *buffer0);
```
which previously managed to prevent the optimization, but no longer does.
You should be able to force the load to not be optimized away by using a volatile load instead. Something like `*(volatile int *)buffer0` should do.
https://github.com/llvm/llvm-project/pull/69727
More information about the llvm-commits
mailing list