[PATCH][AArch64][2/3] PR target/84164: Add ZERO_EXTRACT + LSHIFTRT pattern for BFXIL instruction

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Thu Feb 8 17:10:00 GMT 2018


Hi all,

This is a followup to the other PR target/84164 patch [1] that fixes the testsuite regression
gcc.target/aarch64/bfxil_1.c.
The regression is that with the new subreg+masking simplification we no longer match the
pattern for BFXIL that has the form:
(set (zero_extract:DI (reg/v:DI 76 [ a ])
         (const_int 8 [0x8])
         (const_int 0 [0]))
     (zero_extract:DI (reg/v:DI 76 [ a ])
         (const_int 8 [0x8])
         (const_int 16 [0x10])))

This is now instead represented as:
(set (zero_extract:DI (reg/v:DI 93 [ a ])
         (const_int 8 [0x8])
         (const_int 0 [0]))
     (lshiftrt:DI (reg/v:DI 93 [ a ])
         (const_int 16 [0x10])))

As far as I can see the two are equivalent semantically and the LSHIFTRT form is a bit
simpler, so I think the simplified form is valid, but we have no pattern to match it.
This patch adds that pattern to catch this form as well.
This fixes the aforementioned regression and bootstrap and testing on aarch64-none-linux-gnu
shows no problem.

Is this ok for trunk if the first patch goes in?
Thanks,
Kyrill

[1] https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00443.html

2018-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     PR target/84164
     * config/aarch64/aarch64.md (*extr_insv_lower_reg_lshiftrt<mode>):
     New pattern.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-bfxil-2.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180208/b8aa4436/attachment.bin>


More information about the Gcc-patches mailing list