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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, that probably was an unintended side-effect of now doing

          /* Include the conversion if it is widening and we're using
             the IFN path or the target can handle the converted from
             offset or the current size is not already the same as the
             data vector element size.  */
          if ((TYPE_PRECISION (TREE_TYPE (op0))
               < TYPE_PRECISION (TREE_TYPE (off)))
              && (use_ifn_p
                  || (DR_IS_READ (dr)
                      ? (targetm.vectorize.builtin_gather
                         && targetm.vectorize.builtin_gather (vectype,
                                                              TREE_TYPE (op0),
                                                              scale))
                      : (targetm.vectorize.builtin_scatter
                         && targetm.vectorize.builtin_scatter (vectype,
                                                               TREE_TYPE (op0),
                                                               scale)))
                  || !operand_equal_p (TYPE_SIZE (TREE_TYPE (off)),
                                       TYPE_SIZE (TREE_TYPE (vectype)), 0)))
            {
              off = op0;
              offtype = TREE_TYPE (off);
              STRIP_NOPS (off);
              continue;
            }

that is we no longer try to consume the conversion because with the conversion
source the gather is not supported and the offset is also already of the
size of the data.

We should probably add this testcase to make sure any other heuristic
improvements in the above code doesn't break it again.

Reply via email to