[PATCH] D39345: SCEV: preserve debug information attached to PHI nodes.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 11:14:39 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D39345#914083, @aprantl wrote:

> Thanks for confirming! Also, unfortunate :-(
>  Do you have any feedback on the patch for the zero-delta-case as is that I should be addressing before landing this?


I don't think that we need to check the difference at all in this case. It will always be zero because the new SCEV is generated from the old one:

  // Widen the induction variable expression.
  const SCEV *WideIVExpr = getExtendKind(OrigPhi) == SignExtended
                               ? SE->getSignExtendExpr(AddRec, WideType)
                               : SE->getZeroExtendExpr(AddRec, WideType);

so I think that you can make this debug-value propagation logic simpler?


https://reviews.llvm.org/D39345





More information about the llvm-commits mailing list