Commit 9bc8692a by Joern Rennecke Committed by Joern Rennecke

epiphany.md (mov<mode>, [...]): Check for misaligned memory operands.

        * config/epiphany/epiphany.md (mov<mode>, *mov<mode>_insn): Check
        for misaligned memory operands.
        * config/epiphany/predicates.md (misaligned_operand): New predicate.

From-SVN: r193890
parent ffcc7caf
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
* config/epiphany/epiphany-protos.h (epiphany_regno_rename_ok): Declare. * config/epiphany/epiphany-protos.h (epiphany_regno_rename_ok): Declare.
* config/epiphany/epiphany.c (epiphany_regno_rename_ok): New function. * config/epiphany/epiphany.c (epiphany_regno_rename_ok): New function.
* config/epiphany/epiphany.md (mov<mode>, *mov<mode>_insn): Check
for misaligned memory operands.
* config/epiphany/predicates.md (misaligned_operand): New predicate.
2012-11-28 Richard Biener <rguenther@suse.de> 2012-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/54547 PR tree-optimization/54547
...@@ -325,6 +325,7 @@ ...@@ -325,6 +325,7 @@
if (epiphany_vect_align != 4 /* == 8 */ if (epiphany_vect_align != 4 /* == 8 */
&& !reload_in_progress && !reload_in_progress
&& (GET_CODE (operands[0]) == MEM || GET_CODE (operands[1]) == MEM) && (GET_CODE (operands[0]) == MEM || GET_CODE (operands[1]) == MEM)
&& !misaligned_operand (operands[1], <MODE>mode)
&& (GET_CODE (operands[0]) != SUBREG && (GET_CODE (operands[0]) != SUBREG
|| (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0]))) || (GET_MODE_SIZE (GET_MODE (SUBREG_REG (operands[0])))
!= GET_MODE_SIZE (<MODE>mode) != GET_MODE_SIZE (<MODE>mode)
...@@ -355,7 +356,9 @@ ...@@ -355,7 +356,9 @@
ldrd %0,%X1 ldrd %0,%X1
strd %1,%X0" strd %1,%X0"
"reload_completed "reload_completed
&& ((!MEM_P (operands[0]) && !MEM_P (operands[1])) && (((!MEM_P (operands[0]) || misaligned_operand (operands[0], <MODE>mode))
&& (!MEM_P (operands[1])
|| misaligned_operand (operands[1], <MODE>mode)))
|| epiphany_vect_align == 4)" || epiphany_vect_align == 4)"
[(set (match_dup 2) (match_dup 3)) [(set (match_dup 2) (match_dup 3))
(set (match_dup 4) (match_dup 5))] (set (match_dup 4) (match_dup 5))]
......
...@@ -350,3 +350,8 @@ ...@@ -350,3 +350,8 @@
(define_predicate "nonsymbolic_immediate_operand" (define_predicate "nonsymbolic_immediate_operand"
(ior (match_test "immediate_operand (op, mode)") (ior (match_test "immediate_operand (op, mode)")
(match_code "const_vector"))) /* Is this specific enough? */ (match_code "const_vector"))) /* Is this specific enough? */
;; Return true if OP is misaligned memory operand
(define_predicate "misaligned_operand"
(and (match_code "mem")
(match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment