[X86] Add support for forming vXi16 PMULH instructions from shifts.
authorCraig Topper <craig.topper@intel.com>
Thu, 14 May 2020 17:35:29 +0000 (10:35 -0700)
committerCraig Topper <craig.topper@intel.com>
Thu, 14 May 2020 17:58:00 +0000 (10:58 -0700)
commit2fdeee9c8282df6e1fc0af02a503b4d2c908e49e
tree6113abaaa372e484e8c01701e5d5977a0e1727bc
parent42a556050346ffaa0fe3c0cc4dab24ad65a115a4
[X86] Add support for forming vXi16 PMULH instructions from shifts.

We already form PMULH when the shift is truncated. But we can
also do it from just a shift by extending the result.

Unfortunately, I get regressions if I try to replace the truncate
combine with this as we turn the truncate into a more complicated
sequence first. Then we are unable to combine that sequence with
the extend produced at the end of this combine.

Differential Revision: https://reviews.llvm.org/D79682
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pmulh.ll