This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
target/8763: generic vectors and altivec multiply
- From: pinskia at physics dot uc dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 Nov 2002 03:03:34 -0000
- Subject: target/8763: generic vectors and altivec multiply
- Reply-to: pinskia at physics dot uc dot edu
>Number: 8763
>Category: target
>Synopsis: generic vectors and altivec multiply
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Nov 29 19:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Andrew Pinski
>Release: gcc version 3.3 20021121 (experimental)
>Organization:
>Environment:
powerpc-apple-darwin6.2
>Description:
using generic vectors and multiply with altivec generates wrong code: temp1*temp+0.0f which it should be temp1*temp + -0.0f according to the Motorola's Altivec Technology Programming Environments manual.
>How-To-Repeat:
compile the following code with -maltivec -include altivec.h and see that it uses vmaddfp but with the fourth argument to vmaddfp is really (vector float){0.0f, 0.0f, 0.0f, 0.0f} where it should be (vector float){-0.0f, -0.0f, -0.0f, -0.0f}:
vector float temp;
vector float temp1;
void init()
{
temp = temp1 * temp;
}
>Fix:
change the (unspec:V4SF [(const_int 0)] 142) to (unspec:V4SF [(const_vector:V4SF [
(const_int -2147483648) (const_int -2147483648)
(const_int -2147483648) (const_int -2147483648)])] 142) in altivec.md:497 but this will cause a warning, another bug has been filed asking for a way in .md files to use hex numbers.
>Release-Note:
>Audit-Trail:
>Unformatted: