This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR tree-opt/38865 missing FRE with VIEW_CONVERT_EXPR


Hi,
  The issue here is that we have:
  sv_1(D)->i = { 0, 0, 0, 0 };
  D.1242_2 = VIEW_CONVERT_EXPR<vector float>(sv_1(D)->i);

And FRE/PRE does not see that it could look through the VCE even
though we could.

This patch allows SCCVN to look through the VCE.

OK?  Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
* tree-ssa-sccvn.c (visit_reference_op_load): If vn_reference_lookup
is returns NULL and OP is a VCE, look through the VCE.
(visit_reference_op_store): Unwrap the VCE.

* gcc.dg/tree-ssa/fre-vce-1.c: New testcase.

Attachment: fixpr38865.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]