[PATCH] D110060: [LoopBoundSplit] Handle the case in which exiting block is loop header

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 03:05:22 PDT 2021


jaykang10 added inline comments.


================
Comment at: llvm/test/Transforms/LoopBoundSplit/bug51866.ll:63
+for.cond:                                         ; preds = %for.inc, %entry
+  %i.0 = phi i16 [ 0, %entry ], [ %inc, %for.inc ]
+  %exitcond.not = icmp eq i16 %i.0, 10
----------------
jaykang10 wrote:
> mkazantsev wrote:
> > Could you please add one more Phi next to it (starting from different value, say 10) and make sure it's also properly updated? I don't understand how it will be done.
> You are right! Multiple IVs are not updated with this patch. Let me try to handle it. Thanks @mkazantsev 
I have added `%i.1 = phi i16 [ 10, %entry ], [ %inc, %for.inc ]`. It is not updated because it is not `SCEVAddRecExpr`.


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

https://reviews.llvm.org/D110060



More information about the llvm-commits mailing list