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.

Reply via email to