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] |
Hi,I tried to handle reassoc fails to handle FP division. I think the best way to do this is to do like what is done for MINUS_EXPR. I.e, convert the RDIV_EXPR to MULT_EXPR by (1/x) early and later in opt_rdiv_with_multiply, optimize it.
Here is a patch that passes bootstrap and regression testing on x86-64-linux-gnu.
Does this look Ok for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2016-05-05 Kugan Vivekanandarajah <kuganv@linaro.org> PR middle-end/70841 * gcc.dg/tree-ssa/pr70841.c: New test. gcc/ChangeLog: 2016-05-05 Kugan Vivekanandarajah <kuganv@linaro.org> PR middle-end/70841 * tree-ssa-reassoc.c (should_break_up_rdiv): New. (break_up_rdiv): New (break_up_subtract_bb): Call should_break_up_rdiv and break_up_rdiv. (do_reassoc): Rename break_up_subtract_bb to break_up_subtract_and_div_bb. (sort_cmp_int): New. (opt_rdiv_with_multiply): New. (reassociate_bb): Call opt_rdiv_with_multiply. (do_reassoc): Renamed called function break_up_subtract_bb to break_up_subtract_and_div_bb.
Attachment:
pr70841_2.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |