This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch,AVR]: Fix PR51425
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Eric Weddington <eric dot weddington at atmel dot com>, Denis Chertykov <chertykov at gmail dot com>
- Date: Thu, 08 Dec 2011 19:26:12 +0100
- Subject: [Patch,AVR]: Fix PR51425
This is obvious patch for PR51425: SBIC/SBRC instructions are generated by insn
combine, but insn combine tries zero_extract:QI not zero_extract:HI as in good
old times.
Thus, use QIHI iterator.
Besides fixing this optimization flaw, it enables other developers to reproduce
PR51374: If the pattern is question don't match, PR51374 won't show up in 4.7.
Ok for trunk?
Johann
PR target/51425
* config/avr/avr.md (config/avr/avr.md, *sbix_branch_tmp): Use
zero_extract:QIHI instead of zero_extract:HI.
Index: config/avr/avr.md
===================================================================
--- config/avr/avr.md (revision 182106)
+++ config/avr/avr.md (working copy)
@@ -4699,7 +4699,7 @@ (define_insn "*sbix_branch"
[(set (pc)
(if_then_else
(match_operator 0 "eqne_operator"
- [(zero_extract:HI
+ [(zero_extract:QIHI
(mem:QI (match_operand 1 "low_io_address_operand" "n"))
(const_int 1)
(match_operand 2 "const_int_operand" "n"))
@@ -4746,7 +4746,7 @@ (define_insn "*sbix_branch_tmp"
[(set (pc)
(if_then_else
(match_operator 0 "eqne_operator"
- [(zero_extract:HI
+ [(zero_extract:QIHI
(mem:QI (match_operand 1 "high_io_address_operand" "n"))
(const_int 1)
(match_operand 2 "const_int_operand" "n"))