[Bug c/60819] dse1 removing not-dead insn (aliasing issue?)
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 11 13:16:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60819
--- Comment #10 from Marc Glisse <glisse at gcc dot gnu.org> ---
Ah. So, from a user's POV, it should be valid. But internally, we convert
v2si*->v4hi* (ok), v4hi*->short* (ok), we forget the intermediate step, and we
end up with v2si*->short*, which is not ok since the type through which the
access will happen (short) doesn't have may_alias. The safety of the cast is
not transitive...
Maybe the patch from comment #9 could be restricted to the case where the
vector type has may_alias? That would still break my original testcase, but it
seems illegal anyway (may_alias only works in one direction, the opposite one,
and I think the x86 *intrin.h files are wrong).
More information about the Gcc-bugs
mailing list