This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49903] [avr] Redundant comparisons in binary-search switch/case expansion
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Aug 2011 09:10:20 +0000
- Subject: [Bug target/49903] [avr] Redundant comparisons in binary-search switch/case expansion
- Auto-submitted: auto-generated
- References: <bug-49903-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49903
--- Comment #6 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-08-14 09:10:20 UTC ---
Author: gjl
Date: Sun Aug 14 09:10:13 2011
New Revision: 177744
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177744
Log:
* PR target/49903
* config/avr/avr.md (UNSPEC_IDENTITY): New c_enum.
(branch_unspec): New insn.
(branch): Beauty farm.
* config/avr/avr.c (compare_condition): Use JUMP_P. Test SET_SRC
to be IF_THEN_ELSE.
(avr_compare_pattern, avr_reorg_remove_redundant_compare):
New static functions.
(avr_reorg): Use them. Use next_real_insn instead of NEXT_INSN.
Use CONST_INT_P. Beauty.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.md