[PATCH] D158992: [VPlan] Manage compare predicates in VPRecipeWithIRFlags.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 12:41:55 PDT 2023


Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.

LGTM, adding last couple of nits. thanks!



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h:163
+  VPValue *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
+                      DebugLoc DL = {}, const Twine &Name = "") {
+    return tryInsertInstruction(
----------------
nit: assert Pred is an Integer compare predicate.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:255
+      VPValue(this), Opcode(Opcode), DL(DL), Name(Name.str()) {
+  assert(Opcode == Instruction::ICmp || Opcode == Instruction::FCmp);
+}
----------------
nit: assert Opcode is an ICmp; introduce support for FCmp later when needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158992



More information about the llvm-commits mailing list