pengfei added a comment. > Then we need to add the option -fexcess-precision. I am not sure for now > where and what values the _FLT_EVAL_METHOD should have when excess precision > is enabled/disabled.
I'm fine with a follow up patch to enable this option. Please notice LLVM15 will branch on July 26. I wish we can enable the option before that and make it usable in LLVM15. ================ Comment at: clang/docs/ReleaseNotes.rst:537 +- Support for ``_Float16`` type has been added. + ---------------- We don't need it anymore. It's in line 523 now. ================ Comment at: clang/lib/Basic/Targets/X86.cpp:374-375 } + // Turn on _float16 for x86 (feature sse2) + HasFloat16 = SSELevel >= SSE2; ---------------- It's in line 358. ================ Comment at: clang/test/CodeGen/X86/Float16-arithmetic.c:5-14 + // CHECK-LABEL: @add1 + // CHECK: [[A:%.*]] = alloca half + // CHECK-NEXT: [[B:%.*]] = alloca half + // CHECK: [[A_LOAD:%.*]] = load half, ptr [[A]] + // CHECK-NEXT: [[A_EXT:%.*]] = fpext half [[A_LOAD]] to float + // CHECK-NEXT: [[B_LOAD:%.*]] = load half, ptr [[B]] + // CHECK-NEXT: [[B_EXT:%.*]] = fpext half [[B_LOAD]] to float ---------------- Are these code generated manually? It can be updated by command `llvm/utils/update_cc_test_checks.py clang/test/CodeGen/X86/Float16-arithmetic.c`. ================ Comment at: clang/test/CodeGen/X86/Float16-complex.c:5-19 + // CHECK-LABEL: @add_half_rr( + // CHECK: [[A:%.*]] = alloca half + // CHECK-NEXT: [[B:%.*]] = alloca half + // CHECK: [[A_LOAD:%.*]] = load half, ptr [[A]] + + // AVX-NEXT: [[B_LOAD:%.*]] = load half, ptr [[B]] + // AVX-NEXT: [[AB_ADD:%.*]] = fadd half [[A_LOAD]], [[B_LOAD]] ---------------- It can be generated by script too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits