aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2012-07-10 13:15:26 +0000
committerAlexander Monakov <amonakov@gcc.gnu.org>2012-07-10 17:15:26 +0400
commit2f01137541c6214e5b4bca9fd0257a234bf20bf3 (patch)
treeef13393dd500299e54e1f86a52a0cf3083845fc8 /gcc/config/arm
parent175aed004525c485193d7fed4991a4588846fd79 (diff)
downloadgcc-2f01137541c6214e5b4bca9fd0257a234bf20bf3.zip
gcc-2f01137541c6214e5b4bca9fd0257a234bf20bf3.tar.gz
gcc-2f01137541c6214e5b4bca9fd0257a234bf20bf3.tar.bz2
arm.md (movsi): Don't split symbol refs here.
2012-07-10 Julian Brown <julian@codesourcery.com> * config/arm/arm.md (movsi): Don't split symbol refs here. (define_split): New. From-SVN: r189411
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/arm.md26
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index db404e7..8888382 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -5475,14 +5475,6 @@
optimize && can_create_pseudo_p ());
DONE;
}
-
- if (TARGET_USE_MOVT && !target_word_relocations
- && GET_CODE (operands[1]) == SYMBOL_REF
- && !flag_pic && !arm_tls_referenced_p (operands[1]))
- {
- arm_emit_movpair (operands[0], operands[1]);
- DONE;
- }
}
else /* TARGET_THUMB1... */
{
@@ -5591,6 +5583,24 @@
"
)
+;; Split symbol_refs at the later stage (after cprop), instead of generating
+;; movt/movw pair directly at expand. Otherwise corresponding high_sum
+;; and lo_sum would be merged back into memory load at cprop. However,
+;; if the default is to prefer movt/movw rather than a load from the constant
+;; pool, the performance is better.
+(define_split
+ [(set (match_operand:SI 0 "arm_general_register_operand" "")
+ (match_operand:SI 1 "general_operand" ""))]
+ "TARGET_32BIT
+ && TARGET_USE_MOVT && GET_CODE (operands[1]) == SYMBOL_REF
+ && !flag_pic && !target_word_relocations
+ && !arm_tls_referenced_p (operands[1])"
+ [(clobber (const_int 0))]
+{
+ arm_emit_movpair (operands[0], operands[1]);
+ DONE;
+})
+
(define_insn "*thumb1_movsi_insn"
[(set (match_operand:SI 0 "nonimmediate_operand" "=l,l,l,l,l,>,l, m,*l*h*k")
(match_operand:SI 1 "general_operand" "l, I,J,K,>,l,mi,l,*l*h*k"))]