public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vekumar at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66049] [6 regression] Few AArch64 extend and add with shift tests generates sub optimal code with trunk gcc 6.0.
Date: Mon, 18 May 2015 17:29:00 -0000	[thread overview]
Message-ID: <bug-66049-4-jSexLB1LAm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66049-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from vekumar at gcc dot gnu.org ---
(In reply to ktkachov from comment #3)
> Venkat, are you planning to submit this patch to gcc-patches?
> Also, does this mean we can remove the patterns that do arith+shift using
> MULT rtxes? (like *adds_<optab><mode>_multp2)

Hi Kyrill, 

I added shift based patterns for 

*adds_<optab><mode>_multp2
*subs_<optab><mode>_multp2
*add_uxt<mode>_multp2
*add_uxtsi_multp2_uxtw
*sub_uxt<mode>_multp2
*sub_uxtsi_multp2_uxtw
*adds_mul_imm_<mode>
*subs_mul_imm_<mode>

I added "gcc_unreachable" to these patterns and gcc boostrapped except
add_uxt<mode>_multp2 pattern.


The pattern "*add_uxtdi_multp2" can still be generated. 

/root/work/GCC_Team/vekumar/build-assert-check/./gcc/xgcc
-B/root/work/GCC_Team/vekumar/build-assert-check/./gcc/
-B/root/work/GCC_Team/vekumar/install-assert-check/aarch64-unknown-linux-gnu/bin/
-B/root/work/GCC_Team/vekumar/install-assert-check/aarch64-unknown-linux-gnu/lib/
-isystem
/root/work/GCC_Team/vekumar/install-assert-check/aarch64-unknown-linux-gnu/include
-isystem
/root/work/GCC_Team/vekumar/install-assert-check/aarch64-unknown-linux-gnu/sys-include
   -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector   -fPIC -I. -I. -I../.././gcc
-I../../../gcc-assert-check/libgcc -I../../../gcc-assert-check/libgcc/.
-I../../../gcc-assert-check/libgcc/../gcc
-I../../../gcc-assert-check/libgcc/../include  -DHAVE_CC_TLS  -o _gcov.o -MT
_gcov.o -MD -MP -MF _gcov.dep -DL_gcov -c
../../../gcc-assert-check/libgcc/libgcov-driver.c


insn 1325 1324 1326 137 (set (reg:DI 725 [ ix ])
        (zero_extend:DI (reg/v:SI 197 [ ix ])))
../../../gcc-assert-check/libgcc/libgcov-driver.c:103 73
{*zero_extendsidi2_aarch64}
     (nil))
(insn 1326 1325 1327 137 (set (reg:DI 726)
        (plus:DI (reg:DI 725 [ ix ])
            (const_int 4 [0x4])))
../../../gcc-assert-check/libgcc/libgcov-driver.c:103 87 {*adddi3_aarch64}
     (expr_list:REG_DEAD (reg:DI 725 [ ix ])
        (nil)))
(insn 1327 1326 3536 137 (set (reg/f:DI 727)
        (mem/f:DI (plus:DI (mult:DI (reg:DI 726)
                    (const_int 8 [0x8]))
                (reg/v/f:DI 571 [ list ])) [2 MEM[(const struct gcov_info
*)list_372].merge S8 A64]))
../../../gcc-assert-check/libgcc/libgcov-driver.c:103 40 {*movdi_aarch64}


Successfully matched this instruction:
(set (reg/f:DI 727)
    (plus:DI (and:DI (mult:DI (subreg:DI (reg/v:SI 197 [ ix ]) 0)
                (const_int 8 [0x8]))
            (const_int 34359738360 [0x7fffffff8]))
        (reg/v/f:DI 571 [ list ])))

(insn 1326 1325 1327 137 (set (reg:DI 726)
        (plus:DI (and:DI (mult:DI (subreg:DI (reg/v:SI 197 [ ix ]) 0)
                    (const_int 8 [0x8]))
                (const_int 34359738360 [0x7fffffff8]))
            (reg/v/f:DI 571 [ list ])))
../../../gcc-assert-check/libgcc/libgcov-driver.c:103 252 {*add_uxtdi_multp2}
     (nil))
(insn 1327 1326 3536 137 (set (reg/f:DI 727)
        (mem/f:DI (plus:DI (reg:DI 726)
                (const_int 32 [0x20])) [2 MEM[(const struct gcov_info
*)list_372].merge S8 A64]))
../../../gcc-assert-check/libgcc/libgcov-driver.c:103 40 {*movdi_aarch64}

I am going to first send out patch for adding new shift based patterns.
Then separate patch test  and remove mul patterns.


  parent reply	other threads:[~2015-05-18 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 12:35 [Bug target/66049] New: " vekumar at gcc dot gnu.org
2015-05-08 16:33 ` [Bug target/66049] " ktkachov at gcc dot gnu.org
2015-05-12  8:16 ` ktkachov at gcc dot gnu.org
2015-05-15 14:35 ` ramana at gcc dot gnu.org
2015-05-15 15:38 ` [Bug target/66049] [6 regression] " vekumar at gcc dot gnu.org
2015-05-18 17:29 ` vekumar at gcc dot gnu.org [this message]
2015-05-19  9:27 ` ktkachov at gcc dot gnu.org
2015-05-26 15:32 ` vekumar at gcc dot gnu.org
2015-05-26 16:24 ` vekumar at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66049-4-jSexLB1LAm@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).