[llvm] [VPlan] Add opcode to create step for wide inductions. (PR #119284)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 19:07:24 PST 2024


================
@@ -661,7 +661,8 @@ bool VPInstruction::isFPMathOp() const {
   return Opcode == Instruction::FAdd || Opcode == Instruction::FMul ||
          Opcode == Instruction::FNeg || Opcode == Instruction::FSub ||
          Opcode == Instruction::FDiv || Opcode == Instruction::FRem ||
-         Opcode == Instruction::FCmp || Opcode == Instruction::Select;
+         Opcode == Instruction::FCmp || Opcode == Instruction::Select ||
+         Opcode == VPInstruction::WideIVStep;
----------------
lukel97 wrote:

Oh good point. I had run into this assertion with a wide step with an integer type in `VPInstruction::execute`:

```c++
  assert((hasFastMathFlags() == isFPMathOp() ||
          getOpcode() == Instruction::Select) &&
         "Recipe not a FPMathOp but has fast-math flags?");
```

But this opcode shouldn't have been executed in the first place anyway, it was due to an issue on my end!

https://github.com/llvm/llvm-project/pull/119284


More information about the llvm-commits mailing list