[PATCH] [ARM] Add missing FP build attribute tests.
Charlie Turner
charlie.turner at arm.com
Thu Dec 4 01:36:45 PST 2014
The test file test/CodeGen/ARM/build-attributes.ll was missing several floating-point build attribute tests. The intention of this patch is that for each CPU / architecture currently tested, there are now tests that make sure the following attributes are sufficiently checked,
* Tag_ABI_FP_rounding
* Tag_ABI_FP_denormal
* Tag_ABI_FP_exceptions
* Tag_ABI_FP_user_exceptions
* Tag_ABI_FP_number_model
Also in this commit, the `-unsafe-fp-math flag` has been augmented with the full suite of flags Clang sends to LLVM when you pass `-ffast-math` to Clang. That is, `-unsafe-fp-math` has been changed to `-enable-unsafe-fp-math -disable-fp-elim -enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast`. I made the mistake of thinking LLVM's `-unsafe-fp-math` was the equivalent of Clang's `-ffast-math` originally, and because the fast maths tests I originally had were scant, I didn't realise my error.
The only attribute test here that wasn't tested at all before is `FP_user_exceptions`. The rationale for this attribute's value selection follows that of GCC. By default for all targets, the attribute is zero. If `-fsignaling-nans` is specified, set the attribute to one. The "set the attribute to one" check isn't in this patch, because LLVM doesn't appear to have any flag for signaling NaNs. Clang has an `-fsignaling-nans` flag, but it's unsupported.
The comment in `ARMAsmPrinter` is unrelated to meat of this patch, but it didn't some worth an extra patch.
http://reviews.llvm.org/D6521
Files:
lib/Target/ARM/ARMAsmPrinter.cpp
test/CodeGen/ARM/build-attributes.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6521.16914.patch
Type: text/x-patch
Size: 34967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141204/5545f3da/attachment.bin>
More information about the llvm-commits
mailing list