On 1/15/24 19:04, HAO CHEN GUI wrote:
Hi,
   This patch adds const0 move checking for CLEAR_BY_PIECES. The original
vec_duplicate handles duplicates of non-constant inputs. But 0 is a
constant. So even a platform doesn't support vec_duplicate, it could
still do clear by pieces if it supports const0 move by that mode.

   The test cases will be added in subsequent target specific patch.

   Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no
regressions.

Thanks
Gui Haochen

ChangeLog
expand: Add const0 move checking for CLEAR_BY_PIECES optabs

vec_duplicate handles duplicates of non-constant inputs.  The 0 is a
constant.  So even a platform doesn't support vec_duplicate, it could
still do clear by pieces if it supports const0 move.  This patch adds
the checking.

gcc/
        * expr.cc (by_pieces_mode_supported_p): Add const0 move checking
        for CLEAR_BY_PIECES.'
This doesn't look like it fixes a regression. So it seems to me it ought to wait for gcc-15.

Jeff

Reply via email to