summaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-15 11:07:47 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-15 11:07:47 +0000
commit127cb1cd59c09809a9d240321145612b139e6e4a (patch)
tree5c72c952d5e64996ab124de5c892988b2985f3d4 /gcc/expr.h
parent5ecc7cc35b57c46e6ae0da6525d6bc4bbac04d01 (diff)
downloadgcc-127cb1cd59c09809a9d240321145612b139e6e4a.tar.gz
PR tree-optimization/51581
* expr.h (choose_multiplier): New prototype. * expmed.c (choose_multiplier): No longer static. Change multiplier_ptr from rtx * to UHWI *. (expand_divmod): Adjust callers. * tree-vect-patterns.c (vect_recog_sdivmod_pow2_pattern): Renamed to... (vect_recog_divmod_pattern): ... this. Pass bb_vinfo as last argument to new_stmt_vec_info. Attempt to optimize also divisions by non-pow2 constants if integer vector division isn't supported. * tree-vect-stmts.c (vect_analyze_stmt): If node != NULL, don't look at pattern stmts and sequences. * gcc.c-torture/execute/pr51581-1.c: New test. * gcc.c-torture/execute/pr51581-2.c: New test. * gcc.dg/vect/pr51581-1.c: New test. * gcc.dg/vect/pr51581-2.c: New test. * gcc.dg/vect/pr51581-3.c: New test. * gcc.target/i386/avx-pr51581-1.c: New test. * gcc.target/i386/avx-pr51581-2.c: New test. * gcc.target/i386/avx2-pr51581-1.c: New test. * gcc.target/i386/avx2-pr51581-2.c: New test. * gcc.dg/vect/slp-26.c (main1): Divide by 0x8031 instead of 3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 0096367a727..7444baf166d 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -243,6 +243,13 @@ extern rtx emit_store_flag (rtx, enum rtx_code, rtx, rtx, enum machine_mode,
/* Like emit_store_flag, but always succeeds. */
extern rtx emit_store_flag_force (rtx, enum rtx_code, rtx, rtx,
enum machine_mode, int, int);
+
+/* Choose a minimal N + 1 bit approximation to 1/D that can be used to
+ replace division by D, and put the least significant N bits of the result
+ in *MULTIPLIER_PTR and return the most significant bit. */
+extern unsigned HOST_WIDE_INT choose_multiplier (unsigned HOST_WIDE_INT, int,
+ int, unsigned HOST_WIDE_INT *,
+ int *, int *);
/* Functions from builtins.c: */
extern rtx expand_builtin (tree, rtx, rtx, enum machine_mode, int);