This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/8763: generic vectors and altivec multiply


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]