This only updates one of the uses. The other is used in cases
that may never touch memory, so I'm not sure why this is even
calling it. Perhaps there should be a new, similar hook for such
cases or pass -1 for unknown address space.
Details
Details
- Reviewers
jingyue
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM.
Some architectures (rarely GPUs I assume) can fold multiple regular integer operations into one pointer arithmetic instruction (such as leal in x86). The other place handles that case. I think, for that scenario, it is safe to assume AS = 0 for now. Otherwise, you'd iterate through all address spaces to find any one in which the integer arithmetics can be folded into address computation.
test/Transforms/StraightLineStrengthReduce/R600/reassociate-geps-and-slsr-addrspace.ll | ||
---|---|---|
108 | I'd add an EOL just to be consistent with other files in the LLVM tree. |
I'd add an EOL just to be consistent with other files in the LLVM tree.