[PATCH] D60565: [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.

Whitney via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 10:33:18 PDT 2019


Whitney added inline comments.


================
Comment at: llvm/lib/Analysis/LoopInfo.cpp:420
+  // First operand of CI should be the StepInst
+  if (isa<Instruction>(CI->getOperand(0)))
+    return CI;
----------------
Whitney wrote:
> fhahn wrote:
> > could just be return dyn_cast<Instruction>(CI->getOperand(0))?
> agree
hmmm....getCmpInst expected to return ICmpInst *, dyn_cast<Instruction>(CI->getOperand(0)) should be type of Instruction *.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60565





More information about the llvm-commits mailing list