[LTT] Directly create inbounds gep (NFCI)

We know that this gep is inbounds. Constant expression construction
already infers this fact, but make it explicit.
This commit is contained in:
Nikita Popov 2024-05-29 15:36:08 +02:00
parent 1ea8caeada
commit 0dfd2bf4df

View File

@ -879,7 +879,7 @@ void LowerTypeTestsModule::buildBitSetsFromGlobalVariables(
// Multiply by 2 to account for padding elements.
Constant *CombinedGlobalIdxs[] = {ConstantInt::get(Int32Ty, 0),
ConstantInt::get(Int32Ty, I * 2)};
Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr(
Constant *CombinedGlobalElemPtr = ConstantExpr::getInBoundsGetElementPtr(
NewInit->getType(), CombinedGlobal, CombinedGlobalIdxs);
assert(GV->getType()->getAddressSpace() == 0);
GlobalAlias *GAlias =