@@ -14074,7 +14074,7 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
14074
14074
// Grab the appropriate field from __cpu_model.
14075
14075
llvm::Value *Idxs[] = {ConstantInt::get(Int32Ty, 0),
14076
14076
ConstantInt::get(Int32Ty, Index)};
14077
- llvm::Value *CpuValue = Builder.CreateGEP (STy, CpuModel, Idxs);
14077
+ llvm::Value *CpuValue = Builder.CreateInBoundsGEP (STy, CpuModel, Idxs);
14078
14078
CpuValue = Builder.CreateAlignedLoad(Int32Ty, CpuValue,
14079
14079
CharUnits::fromQuantity(4));
14080
14080
@@ -14116,7 +14116,7 @@ CodeGenFunction::EmitX86CpuSupports(std::array<uint32_t, 4> FeatureMask) {
14116
14116
// global in the struct STy.
14117
14117
Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(3),
14118
14118
Builder.getInt32(0)};
14119
- Value *CpuFeatures = Builder.CreateGEP (STy, CpuModel, Idxs);
14119
+ Value *CpuFeatures = Builder.CreateInBoundsGEP (STy, CpuModel, Idxs);
14120
14120
Value *Features = Builder.CreateAlignedLoad(Int32Ty, CpuFeatures,
14121
14121
CharUnits::fromQuantity(4));
14122
14122
@@ -14137,7 +14137,7 @@ CodeGenFunction::EmitX86CpuSupports(std::array<uint32_t, 4> FeatureMask) {
14137
14137
continue;
14138
14138
Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)};
14139
14139
Value *Features = Builder.CreateAlignedLoad(
14140
- Int32Ty, Builder.CreateGEP (ATy, CpuFeatures2, Idxs),
14140
+ Int32Ty, Builder.CreateInBoundsGEP (ATy, CpuFeatures2, Idxs),
14141
14141
CharUnits::fromQuantity(4));
14142
14142
// Check the value of the bit corresponding to the feature requested.
14143
14143
Value *Mask = Builder.getInt32(M);
@@ -16724,7 +16724,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID,
16724
16724
llvm::Value *Idxs[] = {ConstantInt::get(Int32Ty, 0),
16725
16725
ConstantInt::get(Int32Ty, FieldIdx)};
16726
16726
16727
- FieldValue = Builder.CreateGEP (STy, SysConf, Idxs);
16727
+ FieldValue = Builder.CreateInBoundsGEP (STy, SysConf, Idxs);
16728
16728
FieldValue = Builder.CreateAlignedLoad(Int32Ty, FieldValue,
16729
16729
CharUnits::fromQuantity(4));
16730
16730
} else if (SupportMethod == SYS_CALL) {
0 commit comments