[patch, 4.1, 4.2, 4.3] Fix PR tree-optimization/29925 - bug in data-ref analysis

Richard Guenther richard.guenther@gmail.com
Mon Mar 5 09:47:00 GMT 2007

On 3/5/07, Ira Rosen <IRAR@il.ibm.com> wrote:
> In analysis of data-ref's offset expression, negation should be added to
> the subtrahend part of the expression in case of subtraction.
> Thanks to Harsha for problem analysis and testing on x86-64.
> In addition, the analysis should fail if both operands contain constants
> (we assume that constants are folded beforehand). This problem was revealed
> by this patch http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01800.html.
> Bootstrapped and tested on the vectorizer testcases (4.1, 4.2 and mainline)
> on ppc-linux.
> O.K. for 4.1, 4.2 and mainline once passes complete make-check?
> Thanks,
> Ira

Maybe you can add some commentary above the negation code.  Also while you
changed the return type of analyze_offset you are not checking for it
at the call sites.
Was that part of the patch omitted?


> ChangeLog entry:
>       * tree-data-ref.c (analyze_offset): Add a return value (bool) to
> indicate
>       success/failure of the analysis. Add negation to subtrahend in case
>       of subtraction. Fail if both operands contain constants.
>       (create_data_ref): Fail if analyze_offset fails.
> Patch:
> (See attached file: pr29925.txt)
> :ADDPATCH tree-ssa (non-algorithmic):

More information about the Gcc-patches mailing list