]> granicus.if.org Git - llvm/commit
[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)
commit8d416103aa9acee70cc97646c681de6f8863514a
treefac38d04f9279319a38479f68b3ba08ba91f288d
parent004df2ab002927dfd51375c7d3c3139c182d2151
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360043 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/uint-to-fp-v4i32.ll [new file with mode: 0644]