[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 11:14:49 PDT 2021


kpn added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2844
+      return RValue::get(
+          Builder.CreateArithmeticFence(ArgValue, ConvertType(ArgType)));
+    return RValue::get(ArgValue);
----------------
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?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100118



More information about the cfe-commits mailing list