[all-commits] [llvm/llvm-project] 9bb0ee: [VPlan] Assign custom opcodes to recipes not mappi...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Oct 13 03:16:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bb0eedb59b9a2c4a2e1d2e9f87d1ecf836f70da
      https://github.com/llvm/llvm-project/commit/9bb0eedb59b9a2c4a2e1d2e9f87d1ecf836f70da
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

  Log Message:
  -----------
  [VPlan] Assign custom opcodes to recipes not mapping to IR opcodes. (#162267)

We can perform CSE on recipes that do not directly map to Instruction
opcodes. One example is VPVectorPointerRecipe. Currently this is handled
by supporting them in ::canHandle, but currently that means that we
return std::nullopt from getOpcodeOrIntrinsicID() for it. This currently
only works, because the only case we return std::nullopt and perform CSE
is VPVectorPointerRecipe. But that does not work if we support more such
recipes, like VPPredInstPHIRecipe
(https://github.com/llvm/llvm-project/pull/162110).

To fix this, return a custom opcode from getOpcodeOrIntrinsicID for
recipes like VPVectorPointerRecipe, using the VPDefID after all regular
instruction opcodes.

PR: https://github.com/llvm/llvm-project/pull/162267



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list