EarlyCSE with MemorySSA was able to use this to merge multiple calls
with no intervening store.
Details
- Reviewers
rampitec
Diff Detail
Event Timeline
IntrReadMem doesn't mean it reads memory, it means it only reads memory. Reading and writing memory is the default assumption. The negated behavior of the intrinsic memory attributes is part of why the tablegen inference is so broken
- Patch does more than stated in the description with no justification.
lib/Target/AMDGPU/SMInstructions.td | ||
---|---|---|
160 | This is to defeat tablegen's completely broken inference of instruction flags based on intrinsic properties. This conflicts with the assumed mayStore since the intrinsic isn't IntrReadMem. The assumption the flags directly correspond to the intrinsic attributes is broken because the weird memory dependency is tracked here with hasSideEffects. It's even more broken because this was working with readcyclecounter already, since it isn't a target intrinsic. | |
803 | This was part of trying to avoid not explicitly setting the mayStore flag, but that ultimately didn't work |
lib/Target/AMDGPU/SMInstructions.td | ||
---|---|---|
160 | At the very least it needs a comment explaining why is it '?'. |
It was zero before this patch.