[PATCH] D93769: [clang] Add support for option -ffp-eval-method and extend #pragma float_control similarly

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 7 08:42:30 PDT 2021


aaron.ballman added a reviewer: hubert.reinterpretcast.
aaron.ballman added a subscriber: hubert.reinterpretcast.
aaron.ballman added a comment.

I think the changes look good to me, but I'm not a floating-point expert either.

Adding @hubert.reinterpretcast for his floating-point expertise.



================
Comment at: clang/test/CodeGen/fp-floatcontrol-pragma.cpp:240
+
+float mySub(float x, float y) {
+  // CHECK: define {{.*}}float {{.*}}mySub{{.*}}
----------------
mibintc wrote:
> aaron.ballman wrote:
> > Can we also get some tests that show how this behaves with the less common floating-point types like float16, bfloat16, float128, half?
> I added tests __fp16 and __float128. I don't know if the other type names are supported in Intel, _Float16 isn't supported. I didn't see a typename half nor bfloat16 being used in any of the CodeGen tests, is this sufficient? if the predicate IsFloatingType is true and if the expression comes into UsualUnaryConversions then this new code should take effect 
I think this is fine (I picked the floating point names from Types.h when looking to see what other floating-point types exist) -- thanks for adding the new tests!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93769



More information about the cfe-commits mailing list