[llvm-dev] RFC: Killing undef and spreading poison
Krzysztof Parzyszek via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 20 13:58:39 PDT 2016
In both of these cases, the expression tree in the IR is going to look like
== (freeze(%x), freeze(%x))
The %a and %b are just labels on values, which are defined in the exact
same way. How do you differentiate these two?
If %a = freeze(%x), is %a+1 == %a+1?
-Krzysztof
On 10/20/2016 3:36 PM, Sanjoy Das wrote:
> 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
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list