As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in isGuaranteedToTransferExecutionToSuccessor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM per langref:
The compiler may assume execution will continue after a volatile operation, so operations which modify memory or may have undefined behavior can be hoisted past a volatile operation.
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4268 ↗ | (On Diff #212091) | Side note: These special-cased intrinsics should be synced now that willreturn exists. In particular assume can be removed from the list because it is already willreturn. sideeffect and experimental.widenable.condition should be marked as willreturn (they must be, otherwise this code would be incorrect) and then removed from here. |
llvm/test/Transforms/FunctionAttrs/nonnull.ll | ||
350 ↗ | (On Diff #212091) | nit: wouldn't -> can't |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4268 ↗ | (On Diff #212091) | I agree. I'll fix it in another patch. |