[PATCH] D143526: [GlobalISel] Handle ptr size != index size in IRTranslator
Krzysztof Drewniak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 11:35:49 PST 2023
krzysz00 added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:880
LLT OffsetLLTy =
- getLLTForType(*DL.getIntPtrType(RetTy->getPointerTo(AS)), DL);
+ getLLTForType(*DL.getPtrIndexType(RetTy->getPointerTo(AS)), DL);
----------------
arsenm wrote:
> this would be an ptr addrspace(7) at the end of a large struct return value
Having looked at the context, I think we'd have to invent a target to test this. That is, we'd need a target where the stack lives in a `intptr_t > size_t` world, which ... well, that's CHERI, but not anything upstream.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:1516
PtrTy = getLLTForType(*PtrIRTy, *DL);
- OffsetIRTy = DL->getIntPtrType(PtrIRTy);
+ OffsetIRTy = DL->getPtrIndexType(PtrIRTy);
OffsetTy = getLLTForType(*OffsetIRTy, *DL);
----------------
arsenm wrote:
> vector GEP with a scalar index?
I figure that already either worked or didn't?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143526/new/
https://reviews.llvm.org/D143526
More information about the llvm-commits
mailing list