Patchwork [i386] : Reject wrong RTXes from index early

login
register
mail settings
Submitter Uros Bizjak
Date July 21, 2011, 1:07 p.m.
Message ID <CAFULd4adiydPHSRFvo1nGiMnzBwDA2Vp=B9sdK+AmcCjS2Hz9w@mail.gmail.com>
Download mbox | patch
Permalink /patch/106041/
State New
Headers show

Comments

Uros Bizjak - July 21, 2011, 1:07 p.m.
Hello!

Just a small optimization, we can reject non-register RTXes and wrong
subregs from index early.  No functional change - these RTXes were
rejected in ix86_legitimate_address_p anyway.

2011-07-21  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_decompose_address): Reject all but
	register operands and DImode hard registers in index.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.

Uros.

Patch

Index: i386.c
===================================================================
--- i386.c	(revision 176550)
+++ i386.c	(working copy)
@@ -11203,7 +11203,9 @@ 
 	;
       /* Allow only subregs of DImode hard regs.  */
       else if (GET_CODE (index) == SUBREG
-	       && !register_no_elim_operand (SUBREG_REG (index), DImode))
+	       && register_no_elim_operand (SUBREG_REG (index), DImode))
+	;
+      else
 	return 0;
     }