[PATCH] D15504: Bug fix for shrink-wrap

Weiming Zhao via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 16:11:20 PST 2015


weimingz added a comment.

Hi Quentin,

Yes, but I need to change one line because otherwise, it will crash with other inputs.

else ==>  else if (MLI->getLoopFor(Restore)) {

  // If the loop does not exit, ....
  SmallVector<...> ExitBlocks;

MLI->getLoopFor(Restore)->getExitingBlocks(ExitBlocks);  ==> need to check if Restore is in loop
}

In http://reviews.llvm.org/D15504#310456, @qcolombet wrote:

> Hi Weiming,
>
> Could you try if the attached patch fixes the problem?
>  If it does, that should be a much safer workaround.
>
> Thanks,
> -Quentin
>
> - F1174870: shrink-post-loop.patch <http://reviews.llvm.org/F1174870>
> - F1174869: msg-28761-15.txt <http://reviews.llvm.org/F1174869>





Repository:
  rL LLVM

http://reviews.llvm.org/D15504





More information about the llvm-commits mailing list