This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/42522] (zero_extract:SI (mem:QI) ...) misoptimized
- From: "schwab at linux-m68k dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2010 22:27:47 -0000
- Subject: [Bug rtl-optimization/42522] (zero_extract:SI (mem:QI) ...) misoptimized
- References: <bug-42522-17839@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from schwab at linux-m68k dot org 2010-01-17 22:27 -------
The bug exists since the dawn of time. The problem is that cse thinks that
(zero_extract:SI (mem:QI ...) ...) is zero if (mem:QI ...) is known to be zero,
but the first argument of zero_extract is only a base address if it is a memory
address. On m68k this is only generated when STRICT_ALIGNMENT, and the bug was
hidden until e2496245b8453f49bb4428f281af7686be09ddf8:
2000-07-17 Zack Weinberg <zack@wolery.cumb.org>
(simplify_ternary_operation): Do not examine MODE_BITSIZE of
a CONST_INT, it will always be zero.
--
schwab at linux-m68k dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|target |rtl-optimization
Ever Confirmed|0 |1
GCC target triplet|m68k-*-* |m68k-*-elf
Last reconfirmed|0000-00-00 00:00:00 |2010-01-17 22:27:47
date| |
Summary|[m68k] Wrong code generated |(zero_extract:SI (mem:QI)
|with -O2/-O3 |...) misoptimized
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42522