[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-06-12 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2009-06-12 19:01 --- Fixed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-06-12 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2009-06-12 19:00 --- Subject: Bug 38865 Author: pinskia Date: Fri Jun 12 19:00:39 2009 New Revision: 148437 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148437 Log: 2009-06-12 Andrew Pinski PR tree-opt/38865

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-16 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2009-01-16 18:59 --- Here is another testcase but this time without -> : struct s { int i; }; void g(struct s *); float a (void) { struct s sv; sv.i = 0; int d = sv.i; float d1 = *(float*)&d; g(&sv); return d1; } float a1 (vo

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-16 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2009-01-16 18:55 --- >If you wouldn't generate a V_C_E for *(float*)&sv->i it would just work. The front-end generates them for the vector testcase which is why I added that one to show that forwprop does not matter in the end. --

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-16 Thread rguenther at suse dot de
--- Comment #4 from rguenther at suse dot de 2009-01-16 09:36 --- Subject: Re: missing FRE with VIEW_CONVERT_EXPR On Fri, 16 Jan 2009, pinskia at gcc dot gnu dot org wrote: > --- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-16 02:33 > --- > Mine. Simple patch whic

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-16 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-16 09:27 --- If you wouldn't generate a V_C_E for *(float*)&sv->i it would just work. IMHO this should be invalid gimple anyway, as you V_C_E a register type but the V_C_E argument is not a register. Thus valid gimple would be

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-15 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-16 02:33 --- Mine. Simple patch which implements it in vn_reference_lookup, Since VCE is both a reference and really a bit-wise cast, we can do the normal lookup and then do a lookup if the VCE was not there. I have not seen if

[Bug tree-optimization/38865] missing FRE with VIEW_CONVERT_EXPR

2009-01-15 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-01-15 23:40 --- Note with the disabling of VCE creation for *(float*)&sv->i after this bug has been fixed, there is a possibility that -O2 -fno-strict-aliasing could get slightly better code than -O2 :). -- pinskia at gcc dot gn