mibintc added inline comments.

================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2844
+      return RValue::get(
+          Builder.CreateArithmeticFence(ArgValue, ConvertType(ArgType)));
+    return RValue::get(ArgValue);
----------------
kpn wrote:
> Does this say that the fence will be silently dropped if any of the fast math 
> flags are disabled? Silently dropping something used for correctness makes me 
> nervous. Is there a case where all of these flags are required for correct 
> behavior of the fence?
Yes that is the idea, the clang builtin is only meaningful for float operations 
when -ffast-math is enabled.  If fast math isn't enabled then the operations 
should already be performed strictly.  I didn't have "isFast", should rewrite 
with isFast to make it easier to understand 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100118

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to