* [Bug rtl-optimization/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
@ 2007-06-11 3:02 ` tbptbp at gmail dot com
2007-06-11 7:35 ` ubizjak at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tbptbp at gmail dot com @ 2007-06-11 3:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tbptbp at gmail dot com 2007-06-11 03:02 -------
s/gcc-4.3-20070105/gcc-4.3-20070608/
--
tbptbp at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary| _mm_srli_si128, heinous |_mm_srli_si128, heinous code
|code for some shifts |for some shifts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
2007-06-11 3:02 ` [Bug rtl-optimization/32280] " tbptbp at gmail dot com
@ 2007-06-11 7:35 ` ubizjak at gmail dot com
2007-06-11 7:44 ` [Bug target/32280] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-11 7:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2007-06-11 07:35 -------
This is the fault of combine pass. It isn't obvious to me, why it is
converting:
(insn 7 6 13 2 shift.c:6 (set (subreg:TI (reg:V2DI 62) 0)
(ashift:TI (subreg:TI (reg:V2DI 61 [ __a ]) 0)
(const_int 64 [0x40]))) 1115 {sse2_ashlti3} (insn_list:REG_DEP_TRUE
6 (nil))
(expr_list:REG_DEAD (reg:V2DI 61 [ __a ])
(expr_list:REG_EQUAL (ashift:TI (subreg:TI (reg/v:V2DI 60 [ __a ]) 0)
(const_int 64 [0x40]))
(nil))))
)
to
(insn 7 6 13 2 shift.c:6 (parallel [
(set (subreg:TI (reg:V2DI 62) 0)
(ashift:TI (reg:TI 21 xmm0 [ __a ])
(const_int 64 [0x40])))
(clobber (reg:CC 17 flags))
]) 412 {*ashlti3_2} (nil)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_DEAD (reg:V2DI 21 xmm0 [ __a ])
(nil))))
Note the clobber in above pattern. So, what is wrong with:
(define_insn "sse2_ashlti3"
[(set (match_operand:TI 0 "register_operand" "=x")
(ashift:TI (match_operand:TI 1 "register_operand" "0")
(match_operand:SI 2 "const_0_to_255_mul_8_operand" "n")))]
"TARGET_SSE2"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
2007-06-11 3:02 ` [Bug rtl-optimization/32280] " tbptbp at gmail dot com
2007-06-11 7:35 ` ubizjak at gmail dot com
@ 2007-06-11 7:44 ` pinskia at gcc dot gnu dot org
2007-06-11 10:13 ` uros at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 7:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-06-11 07:44 -------
Because you should not be have two patterns that could match (with one differs
via a clobber). The way to fix this is have the sse2_ashlti3 one do what
ashlti3_2 does for "r" constraints also.
This is the normal two patterns doing the same thing problem.
-- Pinski
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|rtl-optimization |target
Ever Confirmed|0 |1
GCC host triplet|x86-64, linux, gnu |
GCC target triplet| |x86_64-*-*
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2007-06-11 07:44:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
` (2 preceding siblings ...)
2007-06-11 7:44 ` [Bug target/32280] " pinskia at gcc dot gnu dot org
@ 2007-06-11 10:13 ` uros at gcc dot gnu dot org
2007-06-11 10:18 ` ubizjak at gmail dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-06-11 10:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from uros at gcc dot gnu dot org 2007-06-11 10:13 -------
Subject: Bug 32280
Author: uros
Date: Mon Jun 11 10:13:00 2007
New Revision: 125615
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125615
Log:
PR target/32280
* config/i386/sse.md ("sse2_ashlti", "sse2_lshrti3"): Move ...
* config/i386/i386.md ("sse2_ashlti", "sse2_lshrti3"): ... to here.
testsuite/ChangeLog:
PR target/32280
* gcc.target/i386/pr32280.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr32280.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.md
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
` (3 preceding siblings ...)
2007-06-11 10:13 ` uros at gcc dot gnu dot org
@ 2007-06-11 10:18 ` ubizjak at gmail dot com
2007-06-12 12:48 ` ubizjak at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-11 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ubizjak at gmail dot com 2007-06-11 10:18 -------
Fixed.(In reply to comment #3)
> Because you should not be have two patterns that could match (with one differs
> via a clobber). The way to fix this is have the sse2_ashlti3 one do what
> ashlti3_2 does for "r" constraints also.
But we need clobber for "r" constraint, because in this case, insn is split
into logical operations that clobber flags.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
` (4 preceding siblings ...)
2007-06-11 10:18 ` ubizjak at gmail dot com
@ 2007-06-12 12:48 ` ubizjak at gmail dot com
2009-12-17 12:33 ` uros at gcc dot gnu dot org
2009-12-22 17:52 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-12 12:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ubizjak at gmail dot com 2007-06-12 12:48 -------
Fixed.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
` (5 preceding siblings ...)
2007-06-12 12:48 ` ubizjak at gmail dot com
@ 2009-12-17 12:33 ` uros at gcc dot gnu dot org
2009-12-22 17:52 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: uros at gcc dot gnu dot org @ 2009-12-17 12:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from uros at gcc dot gnu dot org 2009-12-17 12:33 -------
Subject: Bug 32280
Author: uros
Date: Thu Dec 17 12:33:09 2009
New Revision: 155312
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155312
Log:
PR target/32280
* config/i386/i386-modes.def (V1TI): New vector mode.
* config/i386/i386.h (VALID_SSE_REG_MODE): Add V1TImode.
(SSE_REG_MODE_P): Ditto.
* config/i386/sse.md (SSEMODE16): New mode iterator.
(AVXMODE16): Ditto.
(avxvecmode): Handle V1TI mode.
(*avx_mov<mode>_internal): Use AVXMODE16 instead of AVXMODE.
(mov<mode>): Use SSEMODE16 instead of SSEMODE.
(*mov<mode>_internal): Ditto.
(push<mode>1): Ditto.
(movmisalign<mode>): Ditto.
(sse2_ashlv1ti): Rename from sse2_ashlti.
(sse2_lshrv1ti): Rename from sse2_lshrti.
(*avx_ashlv1ti): Rename from *avx_ashlti and move from i386.md.
(*avx_lshrv1ti): Rename from *avx_lshrti and move from i386.md.
(vec_shl_<mode>): Convert operands to V1TImode and use V1TI shift.
(vec_shr_<mode>): Ditto.
(*sse2_mulv4si3): Update for renamed sse2_ashlv1ti3.
(udot_prodv4si): Ditto.
* config/i386/i386.c (classify_argument): Handle V1TImode.
(function_arg_advance_32): Ditto.
(function_arg_32): Ditto.
(ix86_expand_sse4_unpack): Convert operands to V1TImode and update
for renamed gen_sse2_lshrv1ti3.
(ix86_expand_args_builtin) <V2DI_FTYPE_V2DI_INT_CONVERT>: Set rmode
to V1TImode.
(struct builtin_description) <__builtin_ia32_pslldqi128>: Update
for renamed sse2_ashlv1ti3.
<__builtin_ia32_psrldqi128>: Update for renamed sse2_lshrv1ti3.
Revert:
2007-06-11 Uros Bizjak <ubizjak@gmail.com>
PR target/32280
* config/i386/sse.md ("sse2_ashlti", "sse2_lshrti3"): Move ...
* config/i386/i386.md ("sse2_ashlti", "sse2_lshrti3"): ... to here.
testsuite/ChangeLog:
PR target/32280
* gcc.target/i386/pr32280-1.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr32280-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386-modes.def
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.h
trunk/gcc/config/i386/i386.md
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/32280] _mm_srli_si128, heinous code for some shifts
2007-06-11 3:00 [Bug rtl-optimization/32280] New: _mm_srli_si128, heinous code for some shifts tbptbp at gmail dot com
` (6 preceding siblings ...)
2009-12-17 12:33 ` uros at gcc dot gnu dot org
@ 2009-12-22 17:52 ` hjl dot tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-12-22 17:52 UTC (permalink / raw)
To: gcc-bugs
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32280
^ permalink raw reply [flat|nested] 9+ messages in thread