From 2cb97c7e29029dc552c66b3ddf6030d826538d47 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 30 Apr 2024 10:43:02 +0100 Subject: [PATCH] [X86] Add TODO for getTargetConstantFromBasePtr to support non-zero offsets. As noted on #66991 - we sometimes share vector constant pool entries, referencing subvectors within them via pointer offsets --- llvm/lib/Target/X86/X86ISelLowering.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 158bf7df07ec3a..859b2682d106c5 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -4639,6 +4639,7 @@ static ConstantPoolSDNode *getTargetConstantPoolFromBasePtr(SDValue Ptr) { return dyn_cast(Ptr); } +// TODO: Add support for non-zero offsets. static const Constant *getTargetConstantFromBasePtr(SDValue Ptr) { ConstantPoolSDNode *CNode = getTargetConstantPoolFromBasePtr(Ptr); if (!CNode || CNode->isMachineConstantPoolEntry() || CNode->getOffset() != 0)