public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized
@ 2004-08-23 13:30 falk at debian dot org
2004-09-24 2:53 ` [Bug rtl-optimization/17151] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: falk at debian dot org @ 2004-08-23 13:30 UTC (permalink / raw)
To: gcc-bugs
gcc 3.5-tree-ssa-lno 20040823 (merged 20040718)
gcc doesn't optimize shift count modulo word size, but curiously it does when
adding one more bit:
unsigned long f(unsigned long x, unsigned long y) { return x >> (y % 64); }
unsigned long g(unsigned long x, unsigned long y) { return x >> (y % 128); }
f:
and $17,63,$17
srl $16,$17,$0
ret
g:
srl $16,$17,$0
ret
It seems this is not a regression, already 2.95 behaved like this.
--
Summary: x >> (y % WORDSIZE) not optimized
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: minor
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
@ 2004-09-24 2:53 ` pinskia at gcc dot gnu dot org
2004-09-26 14:55 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 2:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-24 02:53 -------
Confirmed, patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02483.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |rtl-optimization
Ever Confirmed| |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2004-09-24 02:53:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
2004-09-24 2:53 ` [Bug rtl-optimization/17151] " pinskia at gcc dot gnu dot org
@ 2004-09-26 14:55 ` cvs-commit at gcc dot gnu dot org
2004-09-26 15:16 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-26 14:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-26 14:55 -------
Subject: Bug 17151
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2004-09-26 14:55:38
Modified files:
gcc : ChangeLog combine.c
Log message:
PR middle-end/17151
* combine.c (force_to_mode): Remove dubious early return test that
inhibits further optimization.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5630&r2=2.5631
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/combine.c.diff?cvsroot=gcc&r1=1.455&r2=1.456
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
2004-09-24 2:53 ` [Bug rtl-optimization/17151] " pinskia at gcc dot gnu dot org
2004-09-26 14:55 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-26 15:16 ` pinskia at gcc dot gnu dot org
2004-09-27 14:04 ` schwab at suse dot de
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-26 15:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-26 15:16 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
` (2 preceding siblings ...)
2004-09-26 15:16 ` pinskia at gcc dot gnu dot org
@ 2004-09-27 14:04 ` schwab at suse dot de
2004-09-30 3:05 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: schwab at suse dot de @ 2004-09-27 14:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-09-27 14:04 -------
This breaks ia64 by miscompiling the stage2 compiler.
./xgcc -B./ -B/usr/local/ia64-suse-linux/bin/
-isystem /usr/local/ia64-suse-linux/include
-isystem /usr/local/ia64-suse-linux/sys-include
-L/tmp/cvs/gcc-test-200409262100/Build/gcc/../ld -O2 -DIN_GCC
-DUSE_LIBUNWIND_EXCEPTIONS -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC
-DUSE_GAS_SYMVER -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-c -o crtfastmath.o \
../../gcc/config/ia64/crtfastmath.c
../../gcc/config/ia64/crtfastmath.c: In function '__ia64_set_fast_math':
../../gcc/config/ia64/crtfastmath.c:37: internal compiler error: in bundling,
at config/ia64/ia64.c:6575
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |critical
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
` (3 preceding siblings ...)
2004-09-27 14:04 ` schwab at suse dot de
@ 2004-09-30 3:05 ` pinskia at gcc dot gnu dot org
2004-09-30 16:32 ` roger at eyesopen dot com
2004-09-30 23:48 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-30 3:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-30 03:05 -------
Removing patch keyword as this was reopened for bootstrap failure.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
` (4 preceding siblings ...)
2004-09-30 3:05 ` pinskia at gcc dot gnu dot org
@ 2004-09-30 16:32 ` roger at eyesopen dot com
2004-09-30 23:48 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2004-09-30 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From roger at eyesopen dot com 2004-09-30 16:31 -------
I'm now able to confirm the bootstrap failure on ia64-unknown-linux-gnu (now
that the other bootstrap failures have been resolved), and reverting my patch
fixes the problem. I've managed to identify the problem as the miscompilation
to the file bitmap.o.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/17151] x >> (y % WORDSIZE) not optimized
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
` (5 preceding siblings ...)
2004-09-30 16:32 ` roger at eyesopen dot com
@ 2004-09-30 23:48 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-30 23:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-30 23:48 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17151
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-09-30 23:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23 13:30 [Bug middle-end/17151] New: x >> (y % WORDSIZE) not optimized falk at debian dot org
2004-09-24 2:53 ` [Bug rtl-optimization/17151] " pinskia at gcc dot gnu dot org
2004-09-26 14:55 ` cvs-commit at gcc dot gnu dot org
2004-09-26 15:16 ` pinskia at gcc dot gnu dot org
2004-09-27 14:04 ` schwab at suse dot de
2004-09-30 3:05 ` pinskia at gcc dot gnu dot org
2004-09-30 16:32 ` roger at eyesopen dot com
2004-09-30 23:48 ` 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).