===================================================================
@@ -5551,7 +5551,7 @@
(define_insn "*lea_3_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
- (subreg:SI (match_operand:DI 1 "lea_address_operand" "p") 0)))]
+ (subreg:SI (match_operand:DI 1 "lea_address_operand" "j") 0)))]
"TARGET_64BIT"
"lea{l}\t{%a1, %k0|%k0, %a1}"
[(set_attr "type" "lea")
@@ -5560,7 +5560,7 @@
(define_insn "*lea_4_zext"
[(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI
- (match_operand:SI 1 "lea_address_operand" "p")))]
+ (match_operand:SI 1 "lea_address_operand" "j")))]
"TARGET_64BIT"
"lea{l}\t{%a1, %k0|%k0, %a1}"
[(set_attr "type" "lea")
===================================================================
@@ -19,7 +19,7 @@
;;; Unused letters:
;;; B H T W
-;;; h jk v
+;;; h k v
;; Integer register constraints.
;; It is not necessary to define 'r' here.
@@ -127,6 +127,11 @@
(and (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand")))
+(define_address_constraint "j"
+ "@internal Address operand that can be zero extended in LEA instruction."
+ (and (not (match_code "const_int"))
+ (match_operand 0 "address_operand")))
+
;; Integer constant constraints.
(define_constraint "I"
"Integer constant in the range 0 @dots{} 31, for 32-bit shifts."
===================================================================
@@ -808,8 +808,9 @@
(match_operand 0 "const0_operand")))
;; Return true if op if a valid address for LEA, and does not contain
-;; a segment override.
-(define_predicate "lea_address_operand"
+;; a segment override. Defined as a special predicate to allow
+;; mode-less const_int operands passed to address_operand.
+(define_special_predicate "lea_address_operand"
(match_operand 0 "address_operand")
{
struct ix86_address parts;