Hello!
2013-05-12 Uros Bizjak <[email protected]>
* config/i386/i386.md (*zero_extendsidi2): Add *x->?r alternative.
Tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN.
Uros.
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 198804)
+++ config/i386/i386.md (working copy)
@@ -3092,10 +3092,10 @@
(define_insn "*zero_extendsidi2"
[(set (match_operand:DI 0 "nonimmediate_operand"
- "=r,?r,?o,r ,o,?*Ym,?!*y,?r ,?*Yi,?*x")
+ "=r,?r,?o,r ,o,?*Ym,?!*y,?r ,?r,?*Yi,?*x")
(zero_extend:DI
(match_operand:SI 1 "x86_64_zext_operand"
- "0 ,rm,r ,rmWz,0,r ,m ,*Yj,r ,m")))]
+ "0 ,rm,r ,rmWz,0,r ,m ,*Yj,*x,r ,m")))]
""
{
switch (get_attr_type (insn))
@@ -3112,6 +3112,9 @@
case TYPE_MMXMOV:
return "movd\t{%1, %0|%0, %1}";
+ case TYPE_SSELOG1:
+ return "%vpextrd\t{$0, %1, %k0|%k0, %1, 0}";
+
case TYPE_SSEMOV:
if (GENERAL_REG_P (operands[0]))
return "%vmovd\t{%1, %k0|%k0, %1}";
@@ -3127,7 +3130,9 @@
(const_string "nox64")
(eq_attr "alternative" "3,7")
(const_string "x64")
- (eq_attr "alternative" "9")
+ (eq_attr "alternative" "8")
+ (const_string "x64_sse4")
+ (eq_attr "alternative" "10")
(const_string "sse2")
]
(const_string "*")))
@@ -3136,12 +3141,22 @@
(const_string "multi")
(eq_attr "alternative" "5,6")
(const_string "mmxmov")
- (eq_attr "alternative" "7,8,9")
+ (eq_attr "alternative" "7,9,10")
(const_string "ssemov")
+ (eq_attr "alternative" "8")
+ (const_string "sselog1")
]
(const_string "imovx")))
+ (set (attr "prefix_extra")
+ (if_then_else (eq_attr "alternative" "8")
+ (const_string "1")
+ (const_string "*")))
+ (set (attr "length_immediate")
+ (if_then_else (eq_attr "alternative" "8")
+ (const_string "1")
+ (const_string "*")))
(set (attr "prefix")
- (if_then_else (eq_attr "type" "ssemov")
+ (if_then_else (eq_attr "type" "ssemov,sselog1")
(const_string "maybe_vex")
(const_string "orig")))
(set (attr "prefix_0f")