aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/sse.md
diff options
context:
space:
mode:
authorArtjoms Sinkarovs <artyom.shinkaroff@gmail.com>2011-10-03 08:13:26 -0700
committerRichard Henderson <rth@gcc.gnu.org>2011-10-03 08:13:26 -0700
commitf90e8e2eae9a83d22efd7922673116a97ebf5290 (patch)
treef49377e311033773555fb0a2471ab04986fefafe /gcc/config/i386/sse.md
parente4a5b262e7bc64b22a34ada24b5d83b6c13dbe40 (diff)
downloadgcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.zip
gcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.tar.gz
gcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.tar.bz2
Vector shuffling patch from Artem Shinkarov.
From-SVN: r179462
Diffstat (limited to 'gcc/config/i386/sse.md')
-rw-r--r--gcc/config/i386/sse.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index baa22a6..251cdde 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -230,6 +230,12 @@
(V4SF "V4SF") (V2DF "V2DF")
(TI "TI")])
+;; All 128bit vector modes
+(define_mode_attr sseshuffint
+ [(V16QI "V16QI") (V8HI "V8HI")
+ (V4SI "V4SI") (V2DI "V2DI")
+ (V4SF "V4SI") (V2DF "V2DI")])
+
;; Mapping of vector float modes to an integer mode of the same size
(define_mode_attr sseintvecmode
[(V8SF "V8SI") (V4DF "V4DI")
@@ -6216,6 +6222,19 @@
DONE;
})
+(define_expand "vshuffle<mode>"
+ [(match_operand:V_128 0 "register_operand" "")
+ (match_operand:V_128 1 "register_operand" "")
+ (match_operand:V_128 2 "register_operand" "")
+ (match_operand:<sseshuffint> 3 "register_operand" "")]
+ "TARGET_SSSE3 || TARGET_AVX"
+{
+ bool ok = ix86_expand_vshuffle (operands);
+ gcc_assert (ok);
+ DONE;
+})
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Parallel bitwise logical operations