[llvm-dev] RFC: Killing undef and spreading poison
Sanjoy Das via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 20 13:36:01 PDT 2016
Hi Krzysztof,
Krzysztof Parzyszek wrote:
> On 10/18/2016 4:29 PM, Nuno Lopes wrote:
>> Even %a and %b might not be the same in "%a = freeze(%x), %b =
>> freeze(%x)" (each freeze returns an arbitrary, but fixed, value).
>
> Assume that %x is known to be a poison value and have:
> %a = freeze(%x)
> %b = freeze(%x)
>
> Is %a == %a true?
Yes, %a is always == %a. It is a normal SSA value with some unspecific
content.
> Is %a == %b true?
Not necessarily; but the compiler can make it true by (consistently)
choosing equal values for %a and %b.
By consistently I mean it can't fold one instance of %a == %b to true
and fold another instance of %a == %b to false.
-- Sanjoy
More information about the llvm-dev
mailing list