Index: i386.md
===================================================================
--- i386.md	(revision 184917)
+++ i386.md	(working copy)
@@ -3375,10 +3375,10 @@
 
 (define_insn "*zero_extendsidi2_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand"
-			"=r,o,?*Ym,?*y,?*Yi,!*x")
+			"=r ,o,?*Ym,?*y,?*Yi,!*x")
 	(zero_extend:DI
-	 (match_operand:SI 1 "nonimmediate_operand"
-	        	"rm,0,r   ,m  ,r   ,m*x")))]
+	 (match_operand:SI 1 "x86_64_zext_general_operand"
+	        	"rmZ,0,r   ,m  ,r   ,m*x")))]
   "TARGET_64BIT"
   "@
    mov{l}\t{%1, %k0|%k0, %1}
Index: predicates.md
===================================================================
--- predicates.md	(revision 184917)
+++ predicates.md	(working copy)
@@ -341,6 +341,14 @@
     (match_operand 0 "general_operand")))
 
 ;; Return true if OP is general operand representable on x86_64
+;; as zero extended constant.
+(define_predicate "x86_64_zext_general_operand"
+  (if_then_else (match_test "TARGET_64BIT")
+    (ior (match_operand 0 "nonimmediate_operand")
+	 (match_operand 0 "x86_64_zext_immediate_operand"))
+    (match_operand 0 "general_operand")))
+
+;; Return true if OP is general operand representable on x86_64
 ;; as either sign extended or zero extended constant.
 (define_predicate "x86_64_szext_general_operand"
   (if_then_else (match_test "TARGET_64BIT")
