On 1/15/24 7:04 PM, 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.
OK. But given this patch is several months old, can you re-bootstrap & test before committing to the trunk.

Thanks,
Jeff

Reply via email to