[PATCH] D139902: IR: Add nofpclass parameter attribute

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 06:11:33 PST 2022


pengfei added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14781
   case X86::BI__builtin_ia32_reduce_fmax_ph128: {
+    /// FIXME: This is broken
     Function *F =
----------------
arsenm wrote:
> pengfei wrote:
> > What's broken here? Intrinsics are usually mapped directly to instructions which have different assumptions on the values.
> Accidental diff. This is forcibly setting fast math flags on the builtins regardless of the fp mode, and it's not using a flag guard. This is going to infect later built instructions with wrong fast math flags
Target specific intrinsics are flexible. Some of them imply specific fast math flags. Even compiled without fast math flags, passing e.g., NaNs in this case is UB.


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

https://reviews.llvm.org/D139902



More information about the llvm-commits mailing list