Bug 41770 - graphite miscompiles 434.zeusmp of the SPEC 2k6
Summary: graphite miscompiles 434.zeusmp of the SPEC 2k6
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Sebastian Pop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 18:55 UTC by Sebastian Pop
Modified: 2009-10-22 23:03 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-10-20 18:56:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pop 2009-10-20 18:55:17 UTC
On the "test" data set, (not the "ref" data set) of 434.zeusmp
there is a miscompare when using -fgraphite-identity.
This failure appeared with my patch to handle reductions:

Rewrite reductions out of SSA.

2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
	* graphite-sese-to-poly.c (loop_entry_phi_arg): New.
	(remove_simple_copy_phi): New.
	(remove_invariant_phi): New.
	(simple_copy_phi_p): New.
	(reduction_phi_p): New.
	(gsi_for_ssa_name_def): New.
	(insert_out_of_ssa_copy): New.
	(insert_out_of_ssa_copy_on_edge): New.
	(create_zero_dim_array): New.
	(scalar_close_phi_node_p): New.
	(rewrite_close_phi_out_of_ssa): New.
	(rewrite_phi_out_of_ssa): New.
	(rewrite_reductions_out_of_ssa): New.
	(build_poly_scop): Call rewrite_reductions_out_of_ssa.

The kernel that is miscompiled looks like this:


      subroutine diverg ( isum, div, sumd )

      integer in, jn, kn
      parameter(in =           128+5
     &        , jn =           128+5
     &        , kn =           128+5)

      integer is, ie, js, je, ks, ke
      common /gridcomi/
     &   is, ie, js, je, ks, ke

       integer       i       , j       , k
       real*8  div     (  in,  jn,  kn)

       sumd = 0.0
       if (isum .eq. 1) then
         do 60 k=ks,ke
           do 50 j=js,je
             do 40 i=is,ie
               sumd = sumd + div(i,j,k)
40           continue
50         continue
60       continue
       endif
       return
       end
Comment 1 Sebastian Pop 2009-10-22 23:03:05 UTC
Fixed.