[llvm] InlineCost: Use index sizes rather than pointer sizes in a few cases. (PR #119326)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 08:16:35 PST 2024
================
@@ -1743,7 +1743,7 @@ bool CallAnalyzer::visitPtrToInt(PtrToIntInst &I) {
// integer is large enough to represent the pointer.
unsigned IntegerSize = I.getType()->getScalarSizeInBits();
unsigned AS = I.getOperand(0)->getType()->getPointerAddressSpace();
- if (IntegerSize == DL.getPointerSizeInBits(AS)) {
+ if (IntegerSize == DL.getIndexSizeInBits(AS)) {
----------------
arichardson wrote:
This one I am not 100% certain about - I am not sure we have consensus that index width is equal to the addressable range. I was going to post a RFC on this but as I am about to go on holiday it will most likely be January by the time I post it.
https://github.com/llvm/llvm-project/pull/119326
More information about the llvm-commits
mailing list