public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14899] New: wrong code due to change in compatibility rules for vector types
@ 2004-04-09  7:36 bonzini at gnu dot org
  2004-04-09 11:22 ` [Bug target/14899] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: bonzini at gnu dot org @ 2004-04-09  7:36 UTC (permalink / raw)
  To: gcc-bugs

> #include <altivec.h>
> int main()
> {
>        __vector signed short  res;
>        __vector signed short t8;
>        __vector signed short t9;
>        res = vec_subs(t8, t9);
> }

is incorrectly using vsubuh instead of vsubsh.

This is because __builtin_types_compatible_p (__vector bool short, __vector 
signed short) is returning 1. 

This test case says that it said 1:

int f()
{
return __builtin_types_compatible_p (__vector bool short,
                                     __vector signed short);
}

That's my fault (my vector patch's fault).  It is easy to fix by modifying 
comptypes (I had it in my tree for a while before submitting the patch, but 
caused other regressions on i686, IIRC), but overall it seems quite fragile... 

Paolo

-- 
           Summary: wrong code due to change in compatibility rules for
                    vector types
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org
                CC: apinski at apple dot com,bonzini at gnu dot
                    org,fjahanian at apple dot com,gcc-bugs at gcc dot gnu
                    dot org,zlaski at apple dot com
GCC target triplet: powerpc-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14899


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-05-05 15:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-09  7:36 [Bug target/14899] New: wrong code due to change in compatibility rules for vector types bonzini at gnu dot org
2004-04-09 11:22 ` [Bug target/14899] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-04-09 17:09 ` fjahanian at apple dot com
2004-04-09 17:17 ` pinskia at gcc dot gnu dot org
2004-04-09 17:20 ` fjahanian at apple dot com
2004-04-09 18:01 ` fjahanian at apple dot com
2004-04-10 14:21 ` bonzini at gnu dot org
2004-04-11 12:49 ` bonzini at gnu dot org
2004-04-11 14:51 ` jsm at polyomino dot org dot uk
2004-04-26 15:15 ` bonzini at gnu dot org
2004-05-05  7:22 ` cvs-commit at gcc dot gnu dot org
2004-05-05  7:23 ` cvs-commit at gcc dot gnu dot org
2004-05-05 13:32 ` pinskia at gcc dot gnu dot org
2004-05-05 15:33 ` bonzini at gnu dot org
2004-05-05 15:37 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).