re PR target/68924 (No intrinsic for x86 `MOVQ m64, %xmm` in 32bit mode.)
authorUros Bizjak <ubizjak@gmail.com>
Sun, 10 Mar 2019 22:59:31 +0000 (23:59 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 10 Mar 2019 22:59:31 +0000 (23:59 +0100)
PR target/68924
* config/i386/sse.md (*vec_extractv2di_0_sse):
Add (=r,x) alternative and corresponding splitter.

From-SVN: r269562

gcc/ChangeLog
gcc/config/i386/sse.md

index d1e59d4886a2b8274dab270a128896310a20a6ab..24194ab823e9f07d5133d0408b8acea757c0dce0 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-10  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/68924
+       * config/i386/sse.md (*vec_extractv2di_0_sse):
+       Add (=r,x) alternative and corresponding splitter.
+
 2019-03-10  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/85762
index 259063f786213ad1bc059fdfc3a90c6f582e8278..d4c01407f4a2a078e0d25c091b56e4ac705d3f71 100644 (file)
           (symbol_ref "true")))])
 
 (define_insn "*vec_extractv2di_0_sse"
-  [(set (match_operand:DI 0 "nonimmediate_operand"     "=v,m")
+  [(set (match_operand:DI 0 "nonimmediate_operand"     "=r,x ,m")
        (vec_select:DI
-         (match_operand:V2DI 1 "nonimmediate_operand" "vm,v")
+         (match_operand:V2DI 1 "nonimmediate_operand" " x,xm,x")
          (parallel [(const_int 0)])))]
   "TARGET_SSE && !TARGET_64BIT
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
-  "#")
+  "#"
+  [(set_attr "isa" "sse4,*,*")
+   (set (attr "preferred_for_speed")
+     (cond [(eq_attr "alternative" "0")
+             (symbol_ref "TARGET_INTER_UNIT_MOVES_FROM_VEC")
+          ]
+          (symbol_ref "true")))])
+
+(define_split
+  [(set (match_operand:DI 0 "general_reg_operand")
+       (vec_select:DI
+         (match_operand:V2DI 1 "register_operand")
+         (parallel [(const_int 0)])))]
+  "TARGET_SSE4_1 && !TARGET_64BIT
+   && reload_completed"
+  [(set (match_dup 2) (match_dup 4))
+   (set (match_dup 3)
+       (vec_select:SI
+         (match_dup 5)
+         (parallel [(const_int 1)])))]
+{
+  operands[4] = gen_lowpart (SImode, operands[1]);
+  operands[5] = gen_lowpart (V4SImode, operands[1]);
+  split_double_mode (DImode, &operands[0], 1, &operands[2], &operands[3]);
+})
 
 (define_split
   [(set (match_operand:SWI48x 0 "nonimmediate_operand")