[X86] Improve X86 cmpps/cmppd/cmpss/cmpsd intrinsics with strictfp
authorCraig Topper <craig.topper@intel.com>
Wed, 29 Jan 2020 23:48:09 +0000 (15:48 -0800)
committerCraig Topper <craig.topper@intel.com>
Wed, 29 Jan 2020 23:52:11 +0000 (15:52 -0800)
commita10cec02f79082a1da571e44e68800025b7e6554
tree5f689cbc4f70cec3b6deffd94a6d3d597ed7e3ac
parent35625464c6ddef557c2369946681be5cfb42d5c1
[X86] Improve X86 cmpps/cmppd/cmpss/cmpsd intrinsics with strictfp

The constrained fcmp intrinsics don't allow the TRUE/FALSE predicates.
Using them will assert. To workaround this I'm emitting the old X86 specific intrinsics that were never removed from the backend when we switched to using fcmp in IR. We have no way to mark them as being strict, but that's true of all target specific intrinsics so doesn't seem like we need to solve that here.

I've also added support for selecting between signaling and quiet.

Still need to support SAE which will require using a target specific
intrinsic. Also need to fix masking to not use an AND instruction
after the compare.

Differential Revision: https://reviews.llvm.org/D72906
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/avx-builtins-constrained-cmp.c [new file with mode: 0644]
clang/test/CodeGen/avx512f-builtins-constrained-cmp.c [new file with mode: 0644]
clang/test/CodeGen/avx512vl-builtins-constrained-cmp.c [new file with mode: 0644]
clang/test/CodeGen/sse-builtins-constrained-cmp.c [new file with mode: 0644]
clang/test/CodeGen/sse2-builtins-constrained-cmp.c [new file with mode: 0644]