[PowerPC] Fix erroneous condition for converting uint-to-fp vector conversion
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 6 May 2019 13:35:49 +0000 (13:35 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 6 May 2019 13:35:49 +0000 (13:35 +0000)
commit70afe4f7e1f72607881d8ff4719149a0dbc94120
tree423815da17c0d2ec07b4fc9f87cfcf4e103df073
parent15a37ebb180a41432f05d201a2059470558b2cc5
[PowerPC] Fix erroneous condition for converting uint-to-fp vector conversion

A condition for exiting the legalization of v4i32 conversion to v2f64 through
extract/convert/build erroneously checks for the extract having type i32.
This is not adequate as smaller extracts are actually legalized to i32 as well.
Furthermore, an early exit is missing which means that we only check that
both extracts are from the same vector if that check fails.
As a result, both cases in the included test case fail - the first gets a
select error and the second generates incorrect code.

The culprit commit is r274535.

llvm-svn: 360043
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll [new file with mode: 0644]