[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
Mon Feb 6 10:18:06 PST 2023


ManuelJBrito added a comment.

In D143287#4104056 <https://reviews.llvm.org/D143287#4104056>, @RKSimon wrote:

> What do we gain from using __builtin_nondeterministic_value instead of just setzero? https://godbolt.org/z/zrb6858Mr

__builtin_nondeterministic_value is lowered to freeze(poison)

These intrinsics are meant to be no-op and we can't to that with zeroinitializer, although as of right now instcombine seems to transform the freeze(poison) into zeroinitializer(as shown by your example), so i'll make another patch to fix that.


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