This is split from D113107 to address #56204 and https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366
Could you take the wording I suggested from the other patch? You'll need to drop the part about avoiding intermediate truncations, but it's important to still document the practical/performance difference when AVX512-FP16 is not available, even if the observable behavior is the same.
This test (and Float16.c) should continue to have positive and negative examples even if generic x86_64 is no longer negative. Generic i386 should still be negative, for example.
This broke some compiler-rt tests on Darwin:
Test Result (3 failures / +3) Builtins-x86_64-darwin.Builtins-x86_64-darwin.extendhfsf2_test.c Builtins-x86_64-darwin.Builtins-x86_64-darwin.truncdfhf2_test.c Builtins-x86_64-darwin.Builtins-x86_64-darwin.truncsfhf2_test.c
@pengfei could you fix the Darwin tests as well? And a general comment regarding the ongoing _Float16 effort: I think that this change should have been a part of https://reviews.llvm.org/D107082 to make it possible to build a consistently working toolchain. Thus, if this commit can't be landed in a reasonable time, I'd suggest reverting https://reviews.llvm.org/D107082.
Thanks @benlangmuir for the revert. The problem seems Darwin supports the _Float16 type already but with a different ABI. I have no idea how to solve the problem ATM. Post a question on discourse: https://discourse.llvm.org/t/compiler-rt-tests-fail-on-darwin-stage1-build-after-the-abi-change-of-half-type-on-x86/63508
Use one line for RUN. This isn't long. Delete excess spaces.
x86_64-unknown-unknown can be simplified as x86_64
Delete --check-prefixes=CHECK. This is the default.
The test only has negative patterns. Such a test is prone to be stale without being noticed.
Add some positive CHECK lines.