public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
@ 2004-03-18 13:12 chbchb1130 at sina dot com
  2004-03-18 13:32 ` [Bug c/14631] " chbchb1130 at sina dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: chbchb1130 at sina dot com @ 2004-03-18 13:12 UTC (permalink / raw)
  To: gcc-bugs

when gcc do cse with my sse2 program,it eliminate the RTL generate by 
_mm_insert_epi16 mistakenly.

-- 
           Summary: common subexpression elimilation error with sse2
                    instrinsic _mm_insert_epi16
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chbchb1130 at sina dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
@ 2004-03-18 13:32 ` chbchb1130 at sina dot com
  2004-03-18 13:37 ` chbchb1130 at sina dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: chbchb1130 at sina dot com @ 2004-03-18 13:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From chbchb1130 at sina dot com  2004-03-18 13:32 -------
Created an attachment (id=5940)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5940&action=view)
preprocessed testcase

when I turn on the -O optimization swith,I get the wrong result:
65535	65535	65535	65535	65535	65535	65535	65535
0	0	0	0	0	0	0	0
65535	65535	65535	65535	65535	65535	65535	65535
the correct result is :
65535	65535	65535	65535	65535	65535	65535	65535
0	65535	65535	65535	65535	65535	65535	65535
65535	65535	65535	65535	65535	65535	65535	65535

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
  2004-03-18 13:32 ` [Bug c/14631] " chbchb1130 at sina dot com
@ 2004-03-18 13:37 ` chbchb1130 at sina dot com
  2004-03-18 14:11 ` falk at debian dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: chbchb1130 at sina dot com @ 2004-03-18 13:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From chbchb1130 at sina dot com  2004-03-18 13:37 -------
(In reply to comment #0)
> when gcc do cse with my sse2 program,it eliminate the RTL generate by 
> _mm_insert_epi16 mistakenly.

(In reply to comment #1)
> Created an attachment (id=5940)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5940&action=view)
> preprocessed testcase
> when I turn on the -O optimization swith,I get the wrong result:
> 65535	65535	65535	65535	65535	65535	65535	65535
> 0	0	0	0	0	0	0	0
> 65535	65535	65535	65535	65535	65535	65535	65535
> the correct result is :
> 65535	65535	65535	65535	65535	65535	65535	65535
> 0	65535	65535	65535	65535	65535	65535	65535
> 65535	65535	65535	65535	65535	65535	65535	65535
if I modify the pattern of sse2_pinsrw in i386.md :22089 from vector_merge to 
unspec, the bug is fixed.
initial version:
(define_insn "sse2_pinsrw"
  [(set (match_operand:V8HI 0 "register_operand" "=x")
        (vec_merge:V8HI (match_operand:V8HI 1 "register_operand" "0")
                        (vec_duplicate:V8HI
                         (truncate:HI
                           (match_operand:SI 2 "nonimmediate_operand" "rm")))
                        (match_operand:SI 3 "const_0_to_255_operand" "N")))]
  "TARGET_SSE2"
  "pinsrw\t{%3, %2, %0|%0, %2, %3}"
  [(set_attr "type" "ssecvt")
   (set_attr "mode" "TI")])
modified version:
(define_insn "sse2_pinsrw"
  [(set (match_operand:V8HI 0 "register_operand" "=x")
        (unspec:V8HI (match_operand:V8HI 1 "register_operand" "0")
                        (vec_duplicate:V8HI
                         (truncate:HI
                           (match_operand:SI 2 "nonimmediate_operand" "rm")))
                        (match_operand:SI 3 "const_0_to_255_operand" "N")))]
  "TARGET_SSE2"
  "pinsrw\t{%3, %2, %0|%0, %2, %3}"
  [(set_attr "type" "ssecvt")
   (set_attr "mode" "TI")])



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
  2004-03-18 13:32 ` [Bug c/14631] " chbchb1130 at sina dot com
  2004-03-18 13:37 ` chbchb1130 at sina dot com
@ 2004-03-18 14:11 ` falk at debian dot org
  2004-03-19  6:03 ` chbchb1130 at sina dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: falk at debian dot org @ 2004-03-18 14:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-03-18 14:11 -------
"Fixed" means a patch was checked into CVS, which apparently it wasn't.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (2 preceding siblings ...)
  2004-03-18 14:11 ` falk at debian dot org
@ 2004-03-19  6:03 ` chbchb1130 at sina dot com
  2004-03-21 20:05 ` falk at debian dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: chbchb1130 at sina dot com @ 2004-03-19  6:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From chbchb1130 at sina dot com  2004-03-19 06:03 -------
(In reply to comment #3)
> "Fixed" means a patch was checked into CVS, which apparently it wasn't.
very sorry to make such a mistake due to my first use bugzilla to report bugs.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (3 preceding siblings ...)
  2004-03-19  6:03 ` chbchb1130 at sina dot com
@ 2004-03-21 20:05 ` falk at debian dot org
  2004-06-20  5:14 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: falk at debian dot org @ 2004-03-21 20:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-03-21 20:05 -------
> > "Fixed" means a patch was checked into CVS, which apparently it wasn't.
> very sorry to make such a mistake due to my first use bugzilla to report bugs.

No problem. Please send your fix to gcc-patches, following the procedure
explained at http://gcc.gnu.org/contribute.html.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (4 preceding siblings ...)
  2004-03-21 20:05 ` falk at debian dot org
@ 2004-06-20  5:14 ` pinskia at gcc dot gnu dot org
  2004-09-14 22:11 ` [Bug target/14631] " jsm28 at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-20  5:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-20 05:14:22
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (5 preceding siblings ...)
  2004-06-20  5:14 ` pinskia at gcc dot gnu dot org
@ 2004-09-14 22:11 ` jsm28 at gcc dot gnu dot org
  2004-09-15  5:50 ` uros at kss-loka dot si
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-09-14 22:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jsm28 at gcc dot gnu dot org  2004-09-14 22:10 -------
Not a C front end bug.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (6 preceding siblings ...)
  2004-09-14 22:11 ` [Bug target/14631] " jsm28 at gcc dot gnu dot org
@ 2004-09-15  5:50 ` uros at kss-loka dot si
  2004-09-20 17:48 ` coyote at coyotegulch dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2004-09-15  5:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2004-09-15 05:50 -------
This is still not fixed in mainline CVS. The patch would be an one-liner...

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (7 preceding siblings ...)
  2004-09-15  5:50 ` uros at kss-loka dot si
@ 2004-09-20 17:48 ` coyote at coyotegulch dot com
  2004-12-20 15:08 ` uros at kss-loka dot si
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: coyote at coyotegulch dot com @ 2004-09-20 17:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From coyote at coyotegulch dot com  2004-09-20 17:48 -------
Fix posted to gcc-patches

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01949.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (8 preceding siblings ...)
  2004-09-20 17:48 ` coyote at coyotegulch dot com
@ 2004-12-20 15:08 ` uros at kss-loka dot si
  2004-12-28  9:54 ` uros at kss-loka dot si
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2004-12-20 15:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2004-12-20 15:07 -------
Prototype patch here:
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02450.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (9 preceding siblings ...)
  2004-12-20 15:08 ` uros at kss-loka dot si
@ 2004-12-28  9:54 ` uros at kss-loka dot si
  2005-01-03  6:27 ` cvs-commit at gcc dot gnu dot org
  2005-01-03  6:33 ` uros at kss-loka dot si
  12 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2004-12-28  9:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2004-12-28 09:54 -------
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01999.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |uros at kss-loka dot si
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-06-20 05:14:22         |2004-12-28 09:54:04
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (10 preceding siblings ...)
  2004-12-28  9:54 ` uros at kss-loka dot si
@ 2005-01-03  6:27 ` cvs-commit at gcc dot gnu dot org
  2005-01-03  6:33 ` uros at kss-loka dot si
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-03  6:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-03 06:26 -------
Subject: Bug 14631

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	uros@gcc.gnu.org	2005-01-03 06:26:52

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c i386.md predicates.md 

Log message:
	PR target/14631
	* config/i386/i386.c (ix86_expand_builtin): [IX86_BUILTIN_PINSRW,
	IX86_BUILTIN_PINSRW128]: Fix wrong selector range in error message.
	* config/i386/i386.md (mmx_pinsrw, sse2_pinsrw): Fix selector
	handling.
	(*mmx_pinsrw, *sse2_pinsrw): New patterns.
	* config/i386/i386/predicates.md (const_pow2_1_to_8_operand,
	const_pow2_1_to_128_operand): New predicates.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7003&r2=2.7004
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.766&r2=1.767
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.595&r2=1.596
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/predicates.md.diff?cvsroot=gcc&r1=1.10&r2=1.11



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/14631] common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16
  2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
                   ` (11 preceding siblings ...)
  2005-01-03  6:27 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-03  6:33 ` uros at kss-loka dot si
  12 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2005-01-03  6:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2005-01-03 06:33 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14631


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-01-03  6:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 13:12 [Bug c/14631] New: common subexpression elimilation error with sse2 instrinsic _mm_insert_epi16 chbchb1130 at sina dot com
2004-03-18 13:32 ` [Bug c/14631] " chbchb1130 at sina dot com
2004-03-18 13:37 ` chbchb1130 at sina dot com
2004-03-18 14:11 ` falk at debian dot org
2004-03-19  6:03 ` chbchb1130 at sina dot com
2004-03-21 20:05 ` falk at debian dot org
2004-06-20  5:14 ` pinskia at gcc dot gnu dot org
2004-09-14 22:11 ` [Bug target/14631] " jsm28 at gcc dot gnu dot org
2004-09-15  5:50 ` uros at kss-loka dot si
2004-09-20 17:48 ` coyote at coyotegulch dot com
2004-12-20 15:08 ` uros at kss-loka dot si
2004-12-28  9:54 ` uros at kss-loka dot si
2005-01-03  6:27 ` cvs-commit at gcc dot gnu dot org
2005-01-03  6:33 ` uros at kss-loka dot si

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).