OSDN Git Service

Revert r363802, r363850, and r363856 "[TargetLowering] SimplifyDemandedBits..."
authorCraig Topper <craig.topper@intel.com>
Tue, 25 Jun 2019 01:32:42 +0000 (01:32 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 25 Jun 2019 01:32:42 +0000 (01:32 +0000)
commita488f0fa72863b991a860fe1caa4eda020498bbb
treebe77f220303f78049c8ef1ea9e24ee2ab16b6754
parent21adfc0d6e6a3acbd37db0a69f91c6ad6b31979a
Revert r363802, r363850, and r363856 "[TargetLowering] SimplifyDemandedBits..."

This reverts the following patches.
"[TargetLowering] SimplifyDemandedBits SIGN_EXTEND_VECTOR_INREG -> ANY/ZERO_EXTEND_VECTOR_INREG"
"[TargetLowering] SimplifyDemandedBits ZERO_EXTEND_VECTOR_INREG -> ANY_EXTEND_VECTOR_INREG"
"[TargetLowering] SimplifyDemandedBits - add ANY_EXTEND_VECTOR_INREG support"

We can end up with an any_extend_vector_inreg with a 256 bit result type
and a 128 bit result type. This is allowed by the ISD opcode, but the
generic operation legalizer is only able to expand cases where the
total vector width is the same.

The X86 backend creates these mismatched cases for zext_vec_inreg/sext_vec_inreg.
The SimplifyDemandedBits changes are allowing those nodes to become
aext_vec_inreg. For the zext/sext cases, the X86 backend has Custom
handling and never lets them get to the generic legalizer. We need to do the same
for aext_vec_inreg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364264 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/combine-pmuldq.ll
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/vector-reduce-mul-widen.ll
test/CodeGen/X86/vector-reduce-mul.ll
test/CodeGen/X86/xop-ifma.ll