[PATCH] D51207: Introduce llvm.experimental.widenable_condition intrinsic
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 8 10:54:58 PDT 2018
sanjoy added inline comments.
================
Comment at: docs/LangRef.rst:15161
+
+ %widenable_cond = call i1 @llvm.experimental.widenable.condition()
+ %new_cond = and i1 %any_other_cond, %widenable_cond
----------------
mkazantsev wrote:
> sanjoy wrote:
> > Not sure if this belongs in the langref, but the intrinsic must be RAUW'ed with the stronger condition, replacing just one use is unsound right?
> I see no problem in replacing only one use. It maybe makes no sense, but by definition it should be no bug.
What happens if the initial program is:
```
%c = widenable_cond();
%x = xor %c, %c
```
In this original program `%x` is always `false`, but if you replace one use of `%c` with a different value than the other use then `%x` may not be `false`.
https://reviews.llvm.org/D51207
More information about the llvm-commits
mailing list