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, 4.1, 4.2, 4.3] Fix PR tree-optimization/29925 - bug in data-ref analysis


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

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):

Attachment: pr29925.txt
Description: Text document


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