As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in isGuaranteedToTransferExecutionToSuccessor.
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.
|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.
|350 ↗||(On Diff #212091)|
nit: wouldn't -> can't