Skip to content

Commit 7d4ea77

Browse files
committed
[SDAG] Use index type size for offset accumulation
This is a precondition of the API. Not testable with in-tree targets. Fixes #134008.
1 parent 846000c commit 7d4ea77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ static bool processDbgDeclare(FunctionLoweringInfo &FuncInfo,
15641564

15651565
// Look through casts and constant offset GEPs. These mostly come from
15661566
// inalloca.
1567-
APInt Offset(DL.getTypeSizeInBits(Address->getType()), 0);
1567+
APInt Offset(DL.getIndexTypeSizeInBits(Address->getType()), 0);
15681568
Address = Address->stripAndAccumulateInBoundsConstantOffsets(DL, Offset);
15691569

15701570
// Check if the variable is a static alloca or a byval or inalloca

0 commit comments

Comments
 (0)