Skip to content

Commit b0279ad

Browse files
committed
address comments
Created using spr 1.3.5
1 parent d63112e commit b0279ad

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9840,17 +9840,16 @@ class InstructionsCompatibilityAnalysis {
98409840
// again.
98419841
const unsigned IndexIdx = 1;
98429842
Type *VL0Ty = VL0->getOperand(IndexIdx)->getType();
9843-
Type *Ty = all_of(VL,
9844-
[VL0Ty](Value *V) {
9845-
auto *GEP = dyn_cast<GetElementPtrInst>(V);
9846-
if (!GEP)
9847-
return true;
9848-
return VL0Ty == GEP->getOperand(IndexIdx)->getType();
9849-
})
9850-
? VL0Ty
9851-
: DL.getIndexType(cast<GetElementPtrInst>(VL0)
9852-
->getPointerOperandType()
9853-
->getScalarType());
9843+
Type *Ty =
9844+
all_of(VL,
9845+
[VL0Ty](Value *V) {
9846+
auto *GEP = dyn_cast<GetElementPtrInst>(V);
9847+
return !GEP || VL0Ty == GEP->getOperand(IndexIdx)->getType();
9848+
})
9849+
? VL0Ty
9850+
: DL.getIndexType(cast<GetElementPtrInst>(VL0)
9851+
->getPointerOperandType()
9852+
->getScalarType());
98549853
for (auto [Idx, V] : enumerate(VL)) {
98559854
auto *GEP = dyn_cast<GetElementPtrInst>(V);
98569855
if (!GEP) {

0 commit comments

Comments
 (0)