mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 00:36:34 +00:00
[VPlan] Assert instead checking if VF is vec when widening calls (NFC)
VPWidenCallRecipe should not be generated for scalar VFs. Replace check with an assert.
This commit is contained in:
parent
f9fa8a5997
commit
8bd02e5aef
@ -478,6 +478,7 @@ void VPInstruction::setFastMathFlags(FastMathFlags FMFNew) {
|
||||
}
|
||||
|
||||
void VPWidenCallRecipe::execute(VPTransformState &State) {
|
||||
assert(State.VF.isVector() && "not widening");
|
||||
auto &CI = *cast<CallInst>(getUnderlyingInstr());
|
||||
assert(!isa<DbgInfoIntrinsic>(CI) &&
|
||||
"DbgInfoIntrinsic should have been dropped during VPlan construction");
|
||||
@ -488,9 +489,7 @@ void VPWidenCallRecipe::execute(VPTransformState &State) {
|
||||
// Add return type if intrinsic is overloaded on it.
|
||||
if (isVectorIntrinsicWithOverloadTypeAtArg(VectorIntrinsicID, -1)) {
|
||||
TysForDecl.push_back(
|
||||
State.VF.isVector()
|
||||
? VectorType::get(CI.getType()->getScalarType(), State.VF)
|
||||
: CI.getType());
|
||||
VectorType::get(CI.getType()->getScalarType(), State.VF));
|
||||
}
|
||||
SmallVector<Value *, 4> Args;
|
||||
for (const auto &I : enumerate(operands())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user