This is an archive of the discontinued LLVM Phabricator instance.

[FPEnv][X86] Platform-specific builtin constrained FP enablement
ClosedPublic

Authored by kpn on Jan 28 2020, 11:43 AM.

Details

Summary

[FPEnv][X86] Platform-specific builtin constrained FP enablement

When constrained floating point is enabled the X86-specific builtins don't use constrained intrinsics in some cases. Fix that.

Diff Detail

Event Timeline

kpn created this revision.Jan 28 2020, 11:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2020, 11:43 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
craig.topper added inline comments.Jan 28 2020, 5:37 PM
clang/test/CodeGen/fma-builtins-constrained.c
5

Technically the fmsub/fnmsub/fnmadd assembly requires optimizations to be enabled. If it appears to work without optimizations its only because fast-isel fell back to SelectionDAG and picked up optimizations due to that. Not something that should be relied on.

7

Is this just referring to the FIXME-CHECK-ASM?

kpn marked 2 inline comments as done.Jan 29 2020, 5:46 AM
kpn added inline comments.
clang/test/CodeGen/fma-builtins-constrained.c
5

Ok. Well, the eventual goal is to ship a product with optimization turned on. So I think it makes sense for me to give this a spin with optimizations and see what if anything needs to be done. Unless that's overkill I'll start this afternoon.

7

Yes.

kpn updated this revision to Diff 241771.Jan 31 2020, 10:48 AM

Address review comments: FMA tests are now run optimized. This changes where the FIXME lines are located.

LGTM to me with that FIXME added.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 6 2020, 11:26 AM
This revision was automatically updated to reflect the committed changes.