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: [PR68432 01/22][ARM] Remove operand dependency from "type" attribute


On 11/25/2015 01:21 PM, Richard Sandiford wrote:
-	  (plus:SI (match_operand:SI 0 "s_register_operand" "l,  r")
-		   (match_operand:SI 1 "arm_add_operand"    "lPv,rIL"))
+	  (plus:SI (match_operand:SI 0 "s_register_operand" "l,l, r,r")
+		   (match_operand:SI 1 "arm_add_operand"    "l,Pv,r,IL"))

I'll leave it to ARM maintainers to approve or reject, but I want to point out one thing: IMO this sort of thing is better written as "l,lPv,r,rIL", allowing a larger set of inputs for the later alternatives while still returning the more specific earlier one if it matches. I don't know whether LRA takes advantage of that, but it could help reload, and any post-reload pass might look at the current alternative for a given insn to see whether it can be replaced by a register.


Bernd


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