[X86] Use shufflevector instead of a select with a constant mask for fmaddsub/fmsubad...
authorCraig Topper <craig.topper@intel.com>
Thu, 5 Jul 2018 20:38:31 +0000 (20:38 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 5 Jul 2018 20:38:31 +0000 (20:38 +0000)
commit284c5f342cd93e16db554e5490464ab5672b9285
treec68b07115072f97ce3511b4dc4d5ac75c4254d38
parente2c10f8f4750ca112112d8825b503de2241af204
[X86] Use shufflevector instead of a select with a constant mask for fmaddsub/fmsubadd IR emission.

Shufflevector is easier to generate and matches what the backend pattern matches without relying on constant selects being turned into shuffles.

While I was there I also made the IR regular expressions a little stricter to ensure operand order on the shuffle.

llvm-svn: 336388
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/avx512f-builtins.c
clang/test/CodeGen/avx512vl-builtins.c
clang/test/CodeGen/fma-builtins.c
clang/test/CodeGen/fma4-builtins.c