summaryrefslogtreecommitdiff
path: root/gcc/config/arm/thumb2.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arm/thumb2.md')
-rw-r--r--gcc/config/arm/thumb2.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index 26dcbdde83e..9a11012641d 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -207,7 +207,9 @@
(define_insn "*thumb2_movhi_insn"
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r")
(match_operand:HI 1 "general_operand" "rI,n,r,m"))]
- "TARGET_THUMB2"
+ "TARGET_THUMB2
+ && (register_operand (operands[0], HImode)
+ || register_operand (operands[1], HImode))"
"@
mov%?\\t%0, %1\\t%@ movhi
movw%?\\t%0, %L1\\t%@ movhi