enum class OperationType : unsigned char {
OverflowingBinOp,
PossiblyExactOp,
- FPMathOp,
GEPOp,
+ FPMathOp,
Other
};
struct WrapFlagsTy {
break;
}
}
+
+ bool isInBounds() const {
+ assert(OpType == OperationType::GEPOp &&
+ "recipe doesn't have inbounds flag");
+ return GEPFlags.IsInBounds;
+ }
};
/// VPWidenRecipe is a recipe for producing a copy of vector type its
// Create the new GEP. Note that this GEP may be a scalar if VF == 1,
// but it should be a vector, otherwise.
auto *NewGEP = State.Builder.CreateGEP(GEP->getSourceElementType(), Ptr,
- Indices, "");
- if (auto *I = dyn_cast<GetElementPtrInst>(NewGEP))
- setFlags(I);
+ Indices, "", isInBounds());
assert((State.VF.isScalar() || NewGEP->getType()->isVectorTy()) &&
"NewGEP is not a pointer vector");
State.set(this, NewGEP, Part);