[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 23:31:05 PDT 2020


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:700
   Res = ImplicitCastExpr::Create(Context, T, CK, E, nullptr, VK_RValue,
-                                 FPOptionsOverride());
+                                 CurFPFeatureOverrides());
 
----------------
sepavloff wrote:
> Can cast of kind `CK_NullToPointer` or `CK_LValueToRValue` depend on FP options?
The first never involves an FP type.

The second can be a load of an FP type, but that should never be options-sensitive.  I think it actually *can* do a FP operation because of half->float promotion, but I don't believe there are any options that ever affect that, as it's always perfectly value-preserving.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88913



More information about the cfe-commits mailing list