https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94941

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Sandiford
<rsand...@gcc.gnu.org>:

https://gcc.gnu.org/g:688c8da3eb4cc7482f9844e0e87c11f5003bfbef

commit r10-8090-g688c8da3eb4cc7482f9844e0e87c11f5003bfbef
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Mon May 4 21:22:16 2020 +0100

    internal-fn: Avoid dropping the lhs of some calls [PR94941]

    create_output_operand coerces an output operand to the insn's
    predicates, using a suggested rtx location if convenient.
    But if that rtx location is actually required rather than
    optional, the builder of the insn has to emit a move afterwards.

    (We could instead add a new interface that does this automatically,
    but that's future work.)

    This PR shows that we were failing to emit the move for some of the
    vector load internal functions.  I think there are other routines in
    internal-fn.c that potentially have the same problem, but this patch is
    supposed to be a conservative subset suitable for backporting to GCC 10.

    2020-05-04  Richard Sandiford  <richard.sandif...@arm.com>

    gcc/
            PR middle-end/94941
            * internal-fn.c (expand_load_lanes_optab_fn): Emit a move if the
            chosen lhs is different from the gcall lhs.
            (expand_mask_load_optab_fn): Likewise.
            (expand_gather_load_optab_fn): Likewise.

    gcc/testsuite/
            PR middle-end/94941
            * gcc.target/aarch64/sve/acle/general/unoptimized_1.c: New test.

Reply via email to