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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 2 13:46:35 PDT 2023


fhahn added inline comments.


================
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(
----------------
Ayal wrote:
> nit: assert Pred is an Integer compare predicate.
Added in the committed version, thanks!


================
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);
+}
----------------
Ayal wrote:
> nit: assert Opcode is an ICmp; introduce support for FCmp later when needed.
Removed in the committed version, thanks!


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