[PowerPC] Do not round values prior to converting to integer
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 2 Aug 2018 00:03:22 +0000 (00:03 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 2 Aug 2018 00:03:22 +0000 (00:03 +0000)
commite1a525ed06e1c53f9707d29d7d53c580a738900a
treed02ed4afd2c815417564fd8a1bbf0dc10f0b59d6
parent8fa58b1d178b34a03acf692ec410b0d8a2b3c825
[PowerPC] Do not round values prior to converting to integer

Adding the FP_ROUND nodes when combining FP_TO_[SU]INT of elements
feeding a BUILD_VECTOR into an FP_TO_[SU]INT of the built vector
loses precision. This patch removes the code that adds these nodes
to true f64 operands. It also adds patterns required to ensure
the code is still vectorized rather than converting individual
elements and inserting into a vector.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38342

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

llvm-svn: 338658
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/build-vector-tests.ll