[llvm] [VPlan] Populate and use VPIRFlags from initial VPInstruction (NFC) (PR #168450)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 03:29:05 PST 2025
================
@@ -2056,24 +2056,26 @@ bool VPIRFlags::flagsValidForOpcode(unsigned Opcode) const {
switch (OpType) {
case OperationType::OverflowingBinOp:
return Opcode == Instruction::Add || Opcode == Instruction::Sub ||
- Opcode == Instruction::Mul ||
+ Opcode == Instruction::Mul || Opcode == Instruction::Shl ||
Opcode == VPInstruction::VPInstruction::CanonicalIVIncrementForPart;
case OperationType::Trunc:
return Opcode == Instruction::Trunc;
case OperationType::DisjointOp:
return Opcode == Instruction::Or;
case OperationType::PossiblyExactOp:
- return Opcode == Instruction::AShr;
+ return Opcode == Instruction::AShr || Opcode == Instruction::LShr ||
+ Opcode == Instruction::UDiv || Opcode == Instruction::SDiv;
----------------
fhahn wrote:
Yep, I was looking for something similar before adding the function, but for most IR cases, dyn_cast/cast seems to work fine.
https://github.com/llvm/llvm-project/pull/168450
More information about the llvm-commits
mailing list