On 7/21/2022 3:05 AM, Richard Biener via Gcc-patches wrote:
The following enhances DSE to handle LEN_STORE (optimally) and
MASK_STORE (conservatively).

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
Kewen is testing on powerpc.  Handling MASK_STORE_LANES in
a similar way to MASK_STORE is probably possible but I couldn't
figure a way to generate one for testing.  STORE_LANES is
probably handled already since it's ECF_CONST.

        PR tree-optimization/106365
        * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Handle
        LEN_STORE, add mode to initialize a may-def and handle
        MASK_STORE that way.
        (dse_optimize_stmt): Query may-defs.  Handle internal
        functions LEN_STORE and MASK_STORE similar to how
        we handle memory builtins but without byte tracking.
LGTM.  Obviously if you can massage the PR into a testcase, it's even better :-)

jeff

Reply via email to