[PATCH] D138719: Expand loop peeling phi computation to handle binary ops and casts

Zaara Syeda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 11:00:38 PST 2022


syzaara added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:236
+      // Binary instructions get the max of the operands.
+      assert(I->getOperand(0) && I->getOperand(1) && "bad binary op");
+
----------------
I think these asserts are not needed since BinaryOp and CmpInst will always have 2 operands. Same for the assert below with the cast instruction.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138719



More information about the llvm-commits mailing list