[PATCH] D33279: [JumpThreading] Dont RAUW condition incorrectly
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 12:49:23 PDT 2017
anna added inline comments.
================
Comment at: test/Transforms/JumpThreading/assume.ll:61
+
+; Check that we do prove a fact using an assume within the block and
+; that we *don't* use circular logic to remove the assume.
----------------
I took this test case from Philip's patch: https://reviews.llvm.org/D28276.
I think this test case proves an important point: we *can never* use circular logic to fold assume, because there is no way of knowing whether control unconditionally reaches `assume`, i.e. the function may never be called.
So, we don't need something like the one below, although this makes it much clearer that it's illegal to fold the assume.
```
%notnull = icmp ne i32* %array, null
call exit()
llvm.assume(i1 %notnull)
br i1 %notnull, label %normal, label %error
```
https://reviews.llvm.org/D33279
More information about the llvm-commits
mailing list