Patchwork [i386] : Re-define pic_32bit_operand back to define_predicate

login
register
mail settings
Submitter Uros Bizjak
Date July 28, 2011, 4:38 p.m.
Message ID <CAFULd4bavWAhUThANS7-kMpW84JrD2s+f5=LJxG2csNFNXit9g@mail.gmail.com>
Download mbox | patch
Permalink /patch/107396/
State New
Headers show

Comments

Uros Bizjak - July 28, 2011, 4:38 p.m.
Hello!

With recent developments, there is no need for pic_32bit_operand to be
defined as special predicate with explicit mode checks anymore.
Implicit mode checks (including VIODmode bypass) of normal predicates
work OK now.

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

	* config/i386/predicates.md (pic_32bit_opreand): Do not define as
	special predicate.  Remove explicit mode checks.

Tested on x86_64-pc-linux-gnu {,-m32}. There is remote chance this
patch breaks x32, so let's alert H.J.

Committed to mainline SVN.

Uros.

Patch

Index: predicates.md
===================================================================
--- predicates.md	(revision 176870)
+++ predicates.md	(working copy)
@@ -366,15 +366,12 @@ 
 
 ;; Return true when operand is PIC expression that can be computed by lea
 ;; operation.
-(define_special_predicate "pic_32bit_operand"
+(define_predicate "pic_32bit_operand"
   (match_code "const,symbol_ref,label_ref")
 {
-  if (GET_MODE (op) != SImode
-      && GET_MODE (op) != DImode)
-    return false;
-
   if (!flag_pic)
     return false;
+
   /* Rule out relocations that translate into 64bit constants.  */
   if (TARGET_64BIT && GET_CODE (op) == CONST)
     {
@@ -386,6 +383,7 @@ 
 	      || XINT (op, 1) == UNSPEC_GOT))
 	return false;
     }
+
   return symbolic_operand (op, mode);
 })