[PATCH] D143287: [Clang][x86] Change x86 cast intrinsics to use __builtin_nondeterministic_value

Manuel Brito via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 7 12:16:27 PST 2023


ManuelJBrito added a comment.

In D143287#4108165 <https://reviews.llvm.org/D143287#4108165>, @craig.topper wrote:

> In D143287#4107439 <https://reviews.llvm.org/D143287#4107439>, @ManuelJBrito wrote:
>
>> In D143287#4103597 <https://reviews.llvm.org/D143287#4103597>, @craig.topper wrote:
>>
>>> We have a couple bugs that show (freeze (poison)) doesn't work past SelectionDAG. Is that a concern here? The most recent https://github.com/llvm/llvm-project/issues/60429
>>
>> I don't think it's a concern . Here https://godbolt.org/z/1ecM8roYh the lowering seems ok.
>
> The bugs start occurring if you use the same nondeterministic value multiple times and expect the value to be the same for all uses.

I understand now ... so if the bug is present it works as if it were an undef.  For these intrinsics we would just regress to the current behavior.
So is it okay if we land this patch? Because it will still be an improvement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143287/new/

https://reviews.llvm.org/D143287



More information about the cfe-commits mailing list