This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/46225] New: Wrong code generated for certain constants
- From: "jadamcze at utas dot edu.au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Oct 2010 14:09:51 +0000
- Subject: [Bug target/46225] New: Wrong code generated for certain constants
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46225
Summary: Wrong code generated for certain constants
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jadamcze@utas.edu.au
Target spu-elf, same result with 4.4.5 and 4.5.1
Appears to be an error with constant folding?
For bug.c:
qword f(qword a) {
qword q ={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
return si_ah(a,q);
}
$ spu-elf-gcc bug.c -c -S -o- -O1
.file "bug.c"
.text
.align 3
.global f
.type f, @function
f:
ahi $3,$3,1
bi $lr
.size f, .-f
.ident "GCC: (Gentoo 4.5.1 p1.1, pie-0.4.5) 4.5.1"
ahi $3,$3,1 is wrong here - it should be ahi $3,$3,257