re PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single __aeabi_idivmod call) 2016-10-28 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> Kugan Vivekanandarajah <kuganv@linaro.org> Jim Wilson <jim.wilson@linaro.org> PR tree-optimization/43721 * target.def: New hook expand_divmod_libfunc. * doc/tm.texi.in: Add hook for TARGET_EXPAND_DIVMOD_LIBFUNC * doc/tm.texi: Regenerate. * internal-fn.def: Add new entry for DIVMOD ifn. * internal-fn.c (expand_DIVMOD): New. * tree-ssa-math-opts.c: Include optabs-libfuncs.h, tree-eh.h, targhooks.h. (widen_mul_stats): Add new field divmod_calls_inserted. (target_supports_divmod_p): New. (divmod_candidate_p): Likewise. (convert_to_divmod): Likewise. (pass_optimize_widening_mul::execute): Call calculate_dominance_info(), renumber_gimple_stmt_uids() at beginning of function. Call convert_to_divmod() and record stats for divmod. * config/arm/arm.c (arm_expand_divmod_libfunc): Override hook TARGET_EXPAND_DIVMOD_LIBFUNC. * doc/sourcebuild.texi: Add items for arm_divmod_simode, divmod, divmod_simode. testsuite/ * lib/target-supports.exp (check_effective_target_divmod): New. (check_effective_target_divmod_simode): Likewise. (check_effective_target_arm_divmod_simode): Likewise. * gcc.dg/divmod-1-simode.c: New test. * gcc.dg/divmod-1.c: Likewise. * gcc.dg/divmod-2-simode.c: Likewise. * gcc.dg/divmod-2.c: Likewise. * gcc.dg/divmod-3-simode.c: Likewise. * gcc.dg/divmod-3.c: Likewise. * gcc.dg/divmod-4-simode.c: Likewise. * gcc.dg/divmod-4.c: Likewise. * gcc.dg/divmod-5.c: Likewise. * gcc.dg/divmod-6-simode.c: Likewise. * gcc.dg/divmod-6.c: Likewise. * gcc.dg/divmod-7.c: Likewise. Co-Authored-By: Jim Wilson <jim.wilson@linaro.org> Co-Authored-By: Kugan Vivekanandarajah <kuganv@linaro.org> From-SVN: r241660
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| asan-dg.exp | Loading commit data... | |
| atomic-dg.exp | Loading commit data... | |
| c-compat.exp | Loading commit data... | |
| c-torture.exp | Loading commit data... | |
| cilk-plus-dg.exp | Loading commit data... | |
| clearcap.exp | Loading commit data... | |
| compat.exp | Loading commit data... | |
| copy-file.exp | Loading commit data... | |
| dejapatches.exp | Loading commit data... | |
| dg-pch.exp | Loading commit data... | |
| file-format.exp | Loading commit data... | |
| fortran-modules.exp | Loading commit data... | |
| fortran-torture.exp | Loading commit data... | |
| g++-dg.exp | Loading commit data... | |
| g++.exp | Loading commit data... | |
| gcc-defs.exp | Loading commit data... | |
| gcc-dg.exp | Loading commit data... | |
| gcc-gdb-test.exp | Loading commit data... | |
| gcc-simulate-thread.exp | Loading commit data... | |
| gcc.exp | Loading commit data... | |
| gcov.exp | Loading commit data... | |
| gfortran-dg.exp | Loading commit data... | |
| gfortran.exp | Loading commit data... | |
| gnat-dg.exp | Loading commit data... | |
| gnat.exp | Loading commit data... | |
| go-dg.exp | Loading commit data... | |
| go-torture.exp | Loading commit data... | |
| go.exp | Loading commit data... | |
| lto.exp | Loading commit data... | |
| mike-g++.exp | Loading commit data... | |
| mike-gcc.exp | Loading commit data... | |
| mpx-dg.exp | Loading commit data... | |
| multiline.exp | Loading commit data... | |
| obj-c++-dg.exp | Loading commit data... | |
| obj-c++.exp | Loading commit data... | |
| objc-dg.exp | Loading commit data... | |
| objc-torture.exp | Loading commit data... | |
| objc.exp | Loading commit data... | |
| options.exp | Loading commit data... | |
| plugin-support.exp | Loading commit data... | |
| profopt.exp | Loading commit data... | |
| prune.exp | Loading commit data... | |
| scanasm.exp | Loading commit data... | |
| scandump.exp | Loading commit data... | |
| scanipa.exp | Loading commit data... | |
| scanrtl.exp | Loading commit data... | |
| scantree.exp | Loading commit data... | |
| target-libpath.exp | Loading commit data... | |
| target-supports-dg.exp | Loading commit data... | |
| target-supports.exp | Loading commit data... | |
| target-utils.exp | Loading commit data... | |
| timeout-dg.exp | Loading commit data... | |
| timeout.exp | Loading commit data... | |
| torture-options.exp | Loading commit data... | |
| tsan-dg.exp | Loading commit data... | |
| ubsan-dg.exp | Loading commit data... | |
| wrapper.exp | Loading commit data... |