[PATCH] D157411: [VPlan] Simplify logical OR operations within the VPlan.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 08:20:12 PDT 2023


fhahn added reviewers: Ayal, gilr.
fhahn added a comment.

Providing a PatternMatch implementation for VPlan recipes would be great, thanks for sharing the patch! In terms of where to apply the simplification, I think it would be a beneficial to have a separate simplification transform to handle this and other cases, e.g. see D159200 <https://reviews.llvm.org/D159200>, D159202 <https://reviews.llvm.org/D159202>



================
Comment at: llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:84
+
+    if (cast<VPInstruction>(V)->getOpcode() != Instruction::Select)
+      return false;
----------------
This probably should also match `VPWidenRecipe` & `VPReplicateRecipe` with `Select`/`And`/`Or` and `VPWidenSelectRecipe`. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157411/new/

https://reviews.llvm.org/D157411



More information about the llvm-commits mailing list