[X86] Make masked pcmpeq commutable during isel so we can fold loads in other operand...
authorCraig Topper <craig.topper@intel.com>
Sun, 18 Feb 2018 02:37:33 +0000 (02:37 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 18 Feb 2018 02:37:33 +0000 (02:37 +0000)
commit1040f236a3d9a0dd2db576c94fb93af6d0799940
treeba913312d2758be3bbb641006bd7e1a351e1d0eb
parentb824050658014053db9ad89b99cca06903239d47
[X86] Make masked pcmpeq commutable during isel so we can fold loads in other operand to the shorter encoding.

Previously we used the immediate encoding if the load was in operand 0 and the short encoding if the load was in operand 1.

This added an insane number of bytes to the size of the isel table. I'm wondering if we should always use the immediate form during isel and change to the short form during emission. This would remove the need to pattern match every combination for both the immediate form and the short form during isel. We could do the same with vpcmpgt

llvm-svn: 325456
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
llvm/test/CodeGen/X86/avx512-vec-cmp.ll