[PATCH] D33257: [JumpThreading] Dont RAUW condition if guards in block

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 18:10:09 PDT 2017


anna added a comment.

In https://reviews.llvm.org/D33257#756904, @reames wrote:

> Anna, I believe this is a near duplicate of a patch I posted a while ago and never got around to getting in: https://reviews.llvm.org/D28276.  I'm happy to have you take this to completion, but you might find the code and previous review comments there helpful.
>
> In retrospect, I think I made a mistake in how I approached this.  This is an active bug.  We should remove the replaceAllUsesWith and update the tests as needed.  Only once that's done should we come back and see if we can selectively update in some cases.


Philip, your patch is almost around the same issue! I was under the impression this circular logic affects guards only, but as Sanjoy pointed out it can be assumes as well (because LVI calculates values based on assumes and guards).

So, I'll remove the RAUW in the failing cases, and update the test cases asap. Next step would be following Sanjoy's idea/Philip's patch to reason about aggressively updating in cases where it is safe to do so.


https://reviews.llvm.org/D33257





More information about the llvm-commits mailing list