The experimental_guard intrinsic has memory write semantics to model the thread-exiting
logic, but does not do any actual writes to memory. Currently, AliasSetTracker treats it as a
normal memory write. As result, a loop-invariant load cannot be hoisted out of loop because
the guard may possibly alias with it.
This patch makes AliasSetTracker so that it doesn't treat guards as memory writes.
nitpick, but can you change this comment to:
// guards are marked as modifying memory for control flow modelling purposes, but don't actually modify any specific memory location.