This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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"))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]