Hello! Attached patch is the first small step towards LRA enablement on alpha. As suggester by Richard, the patch rewrites Q constraint as define_memory_constraint, so reload can push AND address to a register.
I will close the referred PR, as it is not a regression and open a new one to track LRA enablement progress. 2015-05-18 Uros Bizjak <ubiz...@gmail.com> Richard Henderson <r...@redhat.com> PR target/57032 * config/alpha/constraints.md (Q): Rewrite as define_memory_constraint. Check for a memory location that is not a reference (using an AND) to an unaligned location here. * config/alpha/predicates.md (normal_memory_operand): Remove. Tested on alpha-linux-gnu and committed to mainline SVN. Uros.
Index: config/alpha/constraints.md =================================================================== --- config/alpha/constraints.md (revision 223268) +++ config/alpha/constraints.md (working copy) @@ -91,9 +91,13 @@ (match_test "op == CONST0_RTX (mode)"))) ;; "Extra" constraints. -(define_constraint "Q" + +;; A memory location that is not a reference +;; (using an AND) to an unaligned location. +(define_memory_constraint "Q" "@internal A normal_memory_operand" - (match_operand 0 "normal_memory_operand")) + (and (match_code "mem") + (not (match_test "GET_CODE (XEXP (op, 0)) == AND")))) (define_constraint "R" "@internal A direct_call_operand" Index: config/alpha/predicates.md =================================================================== --- config/alpha/predicates.md (revision 223268) +++ config/alpha/predicates.md (working copy) @@ -525,14 +525,6 @@ return false; }) -;; Return 1 is OP is a memory location that is not a reference -;; (using an AND) to an unaligned location. Take into account -;; what reload will do. -(define_special_predicate "normal_memory_operand" - (ior (match_test "op = resolve_reload_operand (op), 0") - (and (match_code "mem") - (match_test "GET_CODE (XEXP (op, 0)) != AND")))) - ;; Returns 1 if OP is not an eliminable register. ;; ;; This exists to cure a pathological failure in the s8addq (et al) patterns,