[X86] Make a bunch of merge masked binops commutable for loading folding.
authorCraig Topper <craig.topper@intel.com>
Thu, 6 Jun 2019 21:00:04 +0000 (21:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 6 Jun 2019 21:00:04 +0000 (21:00 +0000)
commitf320f2671674d0e69bf03f639762abb830a058ed
tree4de8798910729cd10d4a811c6d6882f0e5d5db42
parent980d3645df4509ad6e46737a41637427f254e501
[X86] Make a bunch of merge masked binops commutable for loading folding.

This primarily affects add/fadd/mul/fmul/and/or/xor/pmuludq/pmuldq/max/min/fmaxc/fminc/pmaddwd/pavg.

We already commuted the unmasked and zero masked versions.

I've added 512-bit stack folding tests for most of the instructions
affected. I've tested needing commuting and not commuting across
unmasked, merged masked, and zero masked. The 128/256 bit instructions
should behave similarly.

llvm-svn: 362746
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/test/CodeGen/X86/stack-folding-fp-avx512.ll
llvm/test/CodeGen/X86/stack-folding-int-avx512.ll