[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.
authorCraig Topper <craig.topper@intel.com>
Tue, 6 Aug 2019 21:43:15 +0000 (21:43 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 6 Aug 2019 21:43:15 +0000 (21:43 +0000)
commitecc1e5d476581ea85777656e17e3c2a61a874566
tree4230a51c55cfecbe66cccf30a548c46e7e414fdc
parent906e727972d1f4873d006630d6aa6795a7025a1c
[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.

If we're after type legalization we should only be trying to turn
v2i64 into v2i32. So bitcast to v4i32, shuffle the even elements
together. Then use X86ISD::CVTSI2P. The alternative is to leave
the v2i64 type alone and let it scalarized. Hopefully keeping
it packed is better.

Fixes PR42905.

llvm-svn: 368091
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pr42905.ll [new file with mode: 0644]