diff mbox

[i386] : Change mode attribute of movddup insn to DF.

Message ID CAFULd4ZSRbGA4J1eJ5j_S+ZgO0wUtbdR6twv5NsFdRf8uHcMHg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Jan. 9, 2013, 4:50 p.m. UTC
Hello!

Jakub noticed that we declare the mode of movddup insn inconistently
as V2DF or DF. Calculation of various prefixes for certain non-AVX sse
insns depends on correct definition of insn mode; for V2DFmode
prefix_data16 is added and for DFmode, prefix_rep is added. In case of
movddup, the later is used, so the insn mode should be declared as DF.

In practice, there is no difference in calculated insn length, but
let's be consistent here.

2013-01-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sse.md (*vec_interleave_highv2df): Change mode
	attribute of movddup insn to DF.
	(*vec_interleave_lowv2df): Ditto.
	(vec_dupv2df): Ditto.

Patch was tested on x86_64-pc-linux-gnu {,-m32}. The patch is trivial
and will committed to mainline (even in this stage) and 4.7 branch.

Uros.
diff mbox

Patch

Index: sse.md
===================================================================
--- sse.md	(revision 195051)
+++ sse.md	(working copy)
@@ -4622,7 +4622,7 @@ 
   (set_attr "type" "sselog,sselog,sselog,ssemov,ssemov,ssemov")
    (set_attr "prefix_data16" "*,*,*,1,*,1")
    (set_attr "prefix" "orig,vex,maybe_vex,orig,vex,maybe_vex")
-   (set_attr "mode" "V2DF,V2DF,V2DF,V1DF,V1DF,V1DF")])
+   (set_attr "mode" "V2DF,V2DF,DF,V1DF,V1DF,V1DF")])
 
 ;; Recall that the 256-bit unpck insns only shuffle within their lanes.
 (define_expand "avx_movddup256"
@@ -4723,7 +4723,7 @@ 
    (set_attr "type" "sselog,sselog,sselog,ssemov,ssemov,ssemov")
    (set_attr "prefix_data16" "*,*,*,1,*,1")
    (set_attr "prefix" "orig,vex,maybe_vex,orig,vex,maybe_vex")
-   (set_attr "mode" "V2DF,V2DF,V2DF,V1DF,V1DF,V1DF")])
+   (set_attr "mode" "V2DF,V2DF,DF,V1DF,V1DF,V1DF")])
 
 (define_split
   [(set (match_operand:V2DF 0 "memory_operand")
@@ -5180,7 +5180,7 @@ 
   [(set_attr "isa" "noavx,sse3")
    (set_attr "type" "sselog1")
    (set_attr "prefix" "orig,maybe_vex")
-   (set_attr "mode" "V2DF")])
+   (set_attr "mode" "V2DF,DF")])
 
 (define_insn "*vec_concatv2df"
   [(set (match_operand:V2DF 0 "register_operand"     "=x,x,x,x,x,x,x,x")