Am 9/27/2024 um 8:13 PM schrieb Linus Torvalds:
Because even hiding the value one from the compiler will mean that it
can't use the comparison to decide that the originals are equal, even
if one of them is unhidden.
No?
Linus
I think it depends on which one you hide.
If you do
z = b;
hide(z);
if (a==z) { *b; }
then it will be fine, because it knows a==z but nothing about the
relation of b with a or z.
But for
z = a;
hide(z);
if (z==b) { *b; }
then it would still know that b == z, and could replace *b with *z
(which really is *a).
Best wishes,
jonas