[PATCH] D55678: [CVP] Use LVI to constant fold deopt operands

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 10:57:19 PST 2018


reames planned changes to this revision.
reames marked an inline comment as done.
reames added inline comments.


================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:485
+      // instruction as per the checked in test in test/CVP/deopt.ll
+      Constant *C = LVI->getConstant(V, CS.getParent());
+      if (!C) continue;
----------------
anna wrote:
> From the code, `getConstant` calls `getValueInBlock` which returns the value at the end of the BasicBlock. The BB passed in here is the callsite's parent. We want the value which is true at the beginning of the `CS.getParent()` right?
Eek, good catch.  Will have to readjust how I approach this.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55678





More information about the llvm-commits mailing list