[SelectionDAG][X86] Use stack load/store in PromoteIntRes_BITCAST when the input...
authorCraig Topper <craig.topper@intel.com>
Thu, 25 Apr 2019 18:19:59 +0000 (18:19 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 25 Apr 2019 18:19:59 +0000 (18:19 +0000)
commitf9c30eddd013452dafe3649c3c05a74530a43c2d
treec78db3abe4ee3ca1256fedcf6287f11a4db51ea6
parent42ef2c6d06fc6ca7cf9468f3b26f611e2e7da4aa
[SelectionDAG][X86] Use stack load/store in PromoteIntRes_BITCAST when the input needs to be be split and the output type is a vector.

We had special case handling here, but it uses a scalar any_extend for the
promotion then bitcasts to the final type. This won't split up the input data
into multiple promoted elements like we need.

This patch falls back to doing the conversion through memory.

Fixes PR41594 which I believe was reflected in the bitcast-vector-bool.ll
changes. The changes to vector-half-conversions.ll are fixing a previously
unknown miscompile from this issue.

Differential Revision: https://reviews.llvm.org/D61114

llvm-svn: 359219
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/X86/bitcast-vector-bool.ll
llvm/test/CodeGen/X86/vector-half-conversions.ll