]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/32660 (ICE using __builtin_ia32_vec_ext_v2di())
authorUros Bizjak <ubizjak@gmail.com>
Sat, 7 Jul 2007 09:23:04 +0000 (11:23 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 7 Jul 2007 09:23:04 +0000 (11:23 +0200)
        PR target/32660
        Backport from mainline.
        * config/i386/sse.md (*vec_extractv2di_1_sse2): New.
        (*vec_extractv2di_1_sse): New.

From-SVN: r126438

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

index 757f84f7c447ea38b473d5715cd48640788e8261..4475753bb8d2ec8fea520c824d013fbb7f29ab1e 100644 (file)
@@ -1,3 +1,10 @@
+2007-07-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/32660
+       Backport from mainline.
+       * config/i386/sse.md (*vec_extractv2di_1_sse2): New.
+       (*vec_extractv2di_1_sse): New.
+
 2007-07-06  Paolo Bonzini  <bonzini@gnu.org>
 
        PR middle-end/32004
index 8524e70aaeadf9456c950c6fb9ab7661d7cce537..7bd8d469be6a64cd924b6ae35a88aa4dc14d162a 100644 (file)
   operands[1] = gen_rtx_REG (DImode, REGNO (operands[1]));
 })
 
+(define_insn "*vec_extractv2di_1_sse2"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x")
+       (vec_select:DI
+         (match_operand:V2DI 1 "nonimmediate_operand" "x,0,o")
+         (parallel [(const_int 1)])))]
+  "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+  "@
+   movhps\t{%1, %0|%0, %1}
+   psrldq\t{$8, %0|%0, 8}
+   movq\t{%H1, %0|%0, %H1}"
+  [(set_attr "type" "ssemov,sseishft,ssemov")
+   (set_attr "memory" "*,none,*")
+   (set_attr "mode" "V2SF,TI,TI")])
+
+;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva
+(define_insn "*vec_extractv2di_1_sse"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x")
+       (vec_select:DI
+         (match_operand:V2DI 1 "nonimmediate_operand" "x,x,o")
+         (parallel [(const_int 1)])))]
+  "!TARGET_SSE2 && TARGET_SSE
+   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+  "@
+   movhps\t{%1, %0|%0, %1}
+   movhlps\t{%1, %0|%0, %1}
+   movlps\t{%H1, %0|%0, %H1}"
+  [(set_attr "type" "ssemov")
+   (set_attr "mode" "V2SF,V4SF,V2SF")])
+
 (define_insn "*vec_dupv4si"
   [(set (match_operand:V4SI 0 "register_operand" "=Y,x")
        (vec_duplicate:V4SI