[llvm] [VPlan] Use VPInstruction for uniform binops. (PR #141429)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 04:27:23 PDT 2025


================
@@ -1049,15 +1050,17 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
 
 void VPInstructionWithType::execute(VPTransformState &State) {
   State.setDebugLocFrom(getDebugLoc());
-  switch (getOpcode()) {
-  case Instruction::ZExt:
-  case Instruction::Trunc: {
+  if (Instruction::isCast(getOpcode())) {
----------------
ayalz wrote:

This is needed now that SExt/UIToFP/? are also represented as VPInstructionWithType?
Could alternatively introduce additional `case Instruction::`'s, but isCast is more general.

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


More information about the llvm-commits mailing list