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]

Re: Unreviewed patch: PATCH: [darwin] Adding branch prediction bits for bdxx instructions


>>>>> Caroline Tice writes:

Caroline> Yes,  I am combining  two alternatives, one which will use bdn
Caroline> or bdz, and the other which will use
Caroline> bdnz, into one alternative that calls a function.  The function then 
Caroline> puts out the correct (bdn, bdz, or bdnz)
Caroline> instruction(s).

	I am not asking about merging patterns, I am asking about the
number of alternatives in the patterns, for example:

 (define_insn "*ctrsi_internal1"
   [(set (pc)
-       (if_then_else (ne (match_operand:SI 1 "register_operand" "c,*r,*r,*r")
+       (if_then_else (ne (match_operand:SI 1 "register_operand" "c,*r,*r")
                          (const_int 1))
                      (label_ref (match_operand 0 "" ""))
                      (pc)))
-   (set (match_operand:SI 2 "register_operand" "=1,*r,m,*q*c*l")
+   (set (match_operand:SI 2 "register_operand" "=1,*r,m*q*c*l")
        (plus:SI (match_dup 1)
                 (const_int -1)))
-   (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
-   (clobber (match_scratch:SI 4 "=X,X,&r,r"))]
+   (clobber (match_scratch:CC 3 "=X,&x,&x"))
+   (clobber (match_scratch:SI 4 "=X,X,r"))]

Note that you decreased the number of register constraint alternatives
from 4 to 3, merging the "m" case back into the "*q*c*l" case for
match_operand 2 and removing the extra early clobber from match_scratch 4.

David


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