John Regehr via llvm-dev
2017-Jun-16 19:31 UTC
[llvm-dev] a tagged architecture, the elephant in the undef / poison room
> Only freezing it will > replace it with something concrete such that if x is poison then > freeze(x) == freeze(x), etc.Nit: it's not true that freeze(x) == freeze(x) in the current proposal. Each freeze can choose its own value. John
Matthias Braun via llvm-dev
2017-Jun-16 20:05 UTC
[llvm-dev] a tagged architecture, the elephant in the undef / poison room
> On Jun 16, 2017, at 12:31 PM, John Regehr via llvm-dev <llvm-dev at lists.llvm.org> wrote: > >> Only freezing it will >> replace it with something concrete such that if x is poison then >> freeze(x) == freeze(x), etc. > > Nit: it's not true that freeze(x) == freeze(x) in the current proposal. Each freeze can choose its own value.Just for my understanding: Freeze is an instruction isn't it? So this example has to read either: %a = freeze(poison) %b = freeze(poison) %cond = icmp eq %a, %b then %cond isn't necessarily true (and also not necessarily false). While: %a = freeze(poison) %cond = icmp eq %a, %a is always true. Right? - Matthias
John Regehr via llvm-dev
2017-Jun-16 20:17 UTC
[llvm-dev] a tagged architecture, the elephant in the undef / poison room
Right! John On 6/16/17 2:05 PM, Matthias Braun wrote:> >> On Jun 16, 2017, at 12:31 PM, John Regehr via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >>> Only freezing it will >>> replace it with something concrete such that if x is poison then >>> freeze(x) == freeze(x), etc. >> >> Nit: it's not true that freeze(x) == freeze(x) in the current proposal. Each freeze can choose its own value. > Just for my understanding: Freeze is an instruction isn't it? So this example has to read either: > > %a = freeze(poison) > %b = freeze(poison) > %cond = icmp eq %a, %b > > then %cond isn't necessarily true (and also not necessarily false). > > While: > > %a = freeze(poison) > %cond = icmp eq %a, %a > > is always true. Right? > > - Matthias >