Somewhat related to D105338.
While it is up for disscussion whether or not volatile store traps,
so far there has been no complaints that volatile load/cmpxchg/atomicrmw also may trap.
And even if simplifycfg currently concervatively believes that to be the case,
instcombine does not: https://godbolt.org/z/5vhv4K5b8
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This whole code doesn't really make sense. Can we switch it to isGuaranteedToTransferExecutionToSuccessor() (plus the volatile store exception)?
Comment Actions
Yep, this code is really broken.
I'm intentionally not just doing that because i want to make the test diff smaller. (i.e. isGuaranteedToTransferExecutionToSuccessor() will be either next patch, or one after that)
Comment Actions
Okay, LGTM then. This converges on guaranteed-to-execute, and InstCombine has been doing this for quite a while now, so it's clearly fine in practice as well.