[X86] Add full set of patterns for turning ceil/floor/trunc/rint/nearbyint into rndsc...
authorCraig Topper <craig.topper@intel.com>
Tue, 17 Jul 2018 05:48:48 +0000 (05:48 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 17 Jul 2018 05:48:48 +0000 (05:48 +0000)
commitc376a1916b87e2c6330dc43cf9d49acf3ad33a3b
treefad3d5ce38b1d9ae7c1fe3e7f00632a80543f31f
parentc89ef8b13e90bdbcdca9870f707f3d7d04c7986d
[X86] Add full set of patterns for turning ceil/floor/trunc/rint/nearbyint into rndscale with loads, broadcast, and masking.

This amounts to pretty ridiculous number of patterns. Ideally we'd canonicalize the X86ISD::VRNDSCALE earlier to reuse those patterns. I briefly looked into doing that, but some strict FP operations could still get converted to rint and nearbyint during isel. It's probably still worthwhile to look into. This patch is meant as a starting point to work from.

llvm-svn: 337234
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/test/CodeGen/X86/avx512-rndscale.ll