This patch fixes the Altivec addend construction for the fused multiply-add
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)
commit812410f2d18e52df801a8fcac20848dee9052021
treece54439ec690259b1963ac6df190c0da1c6a6f36
parent5a16af86387230c59c8f4ab123964bbd2112a565
This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.

The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).

The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication
test.

llvm-svn: 168998
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/test/CodeGen/PowerPC/buildvec_canonicalize.ll
llvm/test/CodeGen/PowerPC/vec_mul.ll