diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2008-03-30 21:13:33 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2008-03-30 14:13:33 -0700 |
commit | 23594c97b3ec375024937db9491f82c0f07e1b4b (patch) | |
tree | 0b45e84e519da8194c4e2bcafac2c49309fb4e3e /gcc/config | |
parent | e14c931f31a05f6e1bacbdde9d8d87033e8dc093 (diff) | |
download | gcc-23594c97b3ec375024937db9491f82c0f07e1b4b.zip gcc-23594c97b3ec375024937db9491f82c0f07e1b4b.tar.gz gcc-23594c97b3ec375024937db9491f82c0f07e1b4b.tar.bz2 |
re PR target/35757 (Incorrect contraint on sse4_1_blendp<ssemodesuffixf2c>)
gcc/
2008-03-30 H.J. Lu <hongjiu.lu@intel.com>
PR target/35757
* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Issue
proper error message for the third argument on blendpd and
blendps.
* config/i386/sse.md (blendbits): New.
(sse4_1_blendp<ssemodesuffixf2c>): Use it.
gcc/testsuite/
2008-03-30 H.J. Lu <hongjiu.lu@intel.com>
PR target/35757
* gcc.target/i386/sse4_1-blendps-2.c: New.
* gcc.target/i386/sse4_1-pblendw-2.c: Likewise.
From-SVN: r133736
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 5 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4fc8fcd..db593a6 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19738,9 +19738,14 @@ ix86_expand_sse_4_operands_builtin (enum insn_code icode, tree exp, case CODE_FOR_sse4_1_roundsd: case CODE_FOR_sse4_1_roundss: + case CODE_FOR_sse4_1_blendps: error ("the third argument must be a 4-bit immediate"); return const0_rtx; + case CODE_FOR_sse4_1_blendpd: + error ("the third argument must be a 2-bit immediate"); + return const0_rtx; + default: error ("the third argument must be an 8-bit immediate"); return const0_rtx; diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 2ac9fb1..ad17209 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -53,6 +53,9 @@ ;; Mapping of vector modes back to the scalar modes (define_mode_attr ssescalarmode [(V4SF "SF") (V2DF "DF")]) +;; Mapping of immediate bits for blend instructions +(define_mode_attr blendbits [(V4SF "15") (V2DF "3")]) + ;; Patterns whose name begins with "sse{,2,3}_" are invoked by intrinsics. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -6283,7 +6286,7 @@ (vec_merge:SSEMODEF2P (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "xm") (match_operand:SSEMODEF2P 1 "register_operand" "0") - (match_operand:SI 3 "const_0_to_3_operand" "n")))] + (match_operand:SI 3 "const_0_to_<blendbits>_operand" "n")))] "TARGET_SSE4_1" "blendp<ssemodesuffixf2c>\t{%3, %2, %0|%0, %2, %3}" [(set_attr "type" "ssemov") |