public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/82356] auto-vectorizing pack of 16->8 has a redundant AND after a shift
       [not found] <bug-82356-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-14 21:14 ` pinskia at gcc dot gnu.org
  2021-08-25  3:21 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-14 21:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82356

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |rtl-optimization
           Severity|normal                      |enhancement
   Last reconfirmed|2017-09-29 00:00:00         |2021-8-14

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

* [Bug rtl-optimization/82356] auto-vectorizing pack of 16->8 has a redundant AND after a shift
       [not found] <bug-82356-4@http.gcc.gnu.org/bugzilla/>
  2021-08-14 21:14 ` [Bug rtl-optimization/82356] auto-vectorizing pack of 16->8 has a redundant AND after a shift pinskia at gcc dot gnu.org
@ 2021-08-25  3:21 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-25  3:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82356

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2021-08-14 00:00:00         |2021-8-24

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
With -O3 -fno-move-loop-invariants  -fno-gcse 
We get
Trying 38, 34 -> 39:
   38: r160:V8HI=[`*.LC0']
      REG_EQUAL const_vector
   34: r154:V8HI=r153:V8HI 0>>0x8
      REG_DEAD r153:V8HI
   39: r158:V8HI=r160:V8HI&r154:V8HI
      REG_DEAD r154:V8HI
Failed to match this instruction:
(parallel [
        (set (reg:V8HI 158)
            (and:V8HI (lshiftrt:V8HI (reg:V8HI 153 [ vect__1.12 ])
                    (const_int 8 [0x8]))
                (const_vector:V8HI [
                        (const_int 255 [0xff]) repeated x8
                    ])))
        (set (reg:V8HI 160)
            (mem/u/c:V8HI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0  S16
A128]))
    ])
Failed to match this instruction:
(parallel [
        (set (reg:V8HI 158)
            (and:V8HI (lshiftrt:V8HI (reg:V8HI 153 [ vect__1.12 ])
                    (const_int 8 [0x8]))
                (const_vector:V8HI [
                        (const_int 255 [0xff]) repeated x8
                    ])))
        (set (reg:V8HI 160)
            (mem/u/c:V8HI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0  S16
A128]))
    ])
Successfully matched this instruction:
(set (reg:V8HI 160)
    (mem/u/c:V8HI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0  S16 A128]))
Failed to match this instruction:
(set (reg:V8HI 158)
    (and:V8HI (lshiftrt:V8HI (reg:V8HI 153 [ vect__1.12 ])
            (const_int 8 [0x8]))
        (const_vector:V8HI [
                (const_int 255 [0xff]) repeated x8
            ])))

Which we don't recongize the and part is not needed.

Also since we don't emit REG_EQUAL when using vector_csts, we needed to use
"-fno-move-loop-invariants  -fno-gcse ".

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

end of thread, other threads:[~2021-08-25  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-82356-4@http.gcc.gnu.org/bugzilla/>
2021-08-14 21:14 ` [Bug rtl-optimization/82356] auto-vectorizing pack of 16->8 has a redundant AND after a shift pinskia at gcc dot gnu.org
2021-08-25  3:21 ` pinskia at gcc dot gnu.org

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).