[llvm-commits] [llvm] [PATCH] PowerPC: Fix Altivec multiply-add zero sign

Adhemerval Zanella azanella at linux.vnet.ibm.com
Thu Nov 29 10:33:01 PST 2012


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 with 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.

Any tips, advices, comments? Ok to commit?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PowerPC-Fix-Altivec-multiply-add-zero-sign.patch
Type: text/x-patch
Size: 6135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/fdc6c73c/attachment.bin>


More information about the llvm-commits mailing list