]> granicus.if.org Git - llvm/commit
[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)
commit360c172b79e8fd29d091149ee341a1e12517192e
tree478fa8a3ce83dbd28a22c8786c581f875a185baa
parent2f0fa8be4dbd28cec092291e2ff3f53b7ea90da4
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368091 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pr42905.ll [new file with mode: 0644]