[llvm] [LV][EVL] Support icmp/fcmp instruction with EVL-vectorization (PR #108533)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 07:51:32 PDT 2024


================
@@ -1456,38 +1456,60 @@ InstructionCost VPWidenRecipe::computeCost(ElementCount VF,
 
 void VPWidenEVLRecipe::execute(VPTransformState &State) {
   unsigned Opcode = getOpcode();
-  // TODO: Support other opcodes
-  if (!Instruction::isBinaryOp(Opcode) && !Instruction::isUnaryOp(Opcode))
-    llvm_unreachable("Unsupported opcode in VPWidenEVLRecipe::execute");
+  if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) {
----------------
fhahn wrote:

If possible that would be great, given that there are quite a few changes to the existing code here

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


More information about the llvm-commits mailing list