SelectMOVRELOffset prevents peeling of a constant from an index
if final base could be negative. isBaseWithConstantOffset() succeeds
if a value is an "add" or "or" operator. In case of "or" it shall
be an add-like "or" which never changes a sign of the sum given a
non-negative offset. I.e. we can safely allow peeling if operator is
an "or".
Details
Details
- Reviewers
arsenm cfang - Commits
- rG591b029f40f7: [AMDGPU] Optimized indirect multi-VGPR addressing
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | ||
---|---|---|
1905–1907 | Couldn't it change the sign for (or 0, 0x80000000)? |
Comment Actions
Added check for positive index.
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | ||
---|---|---|
1905–1907 | Thanks. Added check. |
Couldn't it change the sign for (or 0, 0x80000000)?