diff options
author | Richard Biener <rguenther@suse.de> | 2018-01-24 09:31:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-01-24 09:31:56 +0000 |
commit | da37a70f55338ef295bb1f7a39f9ef3e407835dd (patch) | |
tree | 9688e107e8359408fc0e893df65b1ce706c9d077 /gcc/graphite-isl-ast-to-gimple.c | |
parent | df9e39b16e41cd3452e6349e0f662f8aaf9a2dfa (diff) | |
download | gcc-da37a70f55338ef295bb1f7a39f9ef3e407835dd.zip gcc-da37a70f55338ef295bb1f7a39f9ef3e407835dd.tar.gz gcc-da37a70f55338ef295bb1f7a39f9ef3e407835dd.tar.bz2 |
re PR tree-optimization/82819 ([graphite] ICE in set_codegen_error, at graphite-isl-ast-to-gimple.c:206)
2018-01-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82819
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
code generating pluses that are no-ops in the target precision.
* gcc.dg/graphite/pr82819.c: New testcase.
From-SVN: r257012
Diffstat (limited to 'gcc/graphite-isl-ast-to-gimple.c')
-rw-r--r-- | gcc/graphite-isl-ast-to-gimple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 322084f..89d8d94 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -326,7 +326,8 @@ binary_op_to_tree (tree type, __isl_take isl_ast_expr *expr, ivs_params &ip) /* From our constraint generation we may get modulo operations that we cannot represent explicitely but that are no-ops for TYPE. Elide those. */ - if (expr_type == isl_ast_op_pdiv_r + if ((expr_type == isl_ast_op_pdiv_r + || expr_type == isl_ast_op_add) && isl_ast_expr_get_type (arg_expr) == isl_ast_expr_int && (wi::exact_log2 (widest_int_from_isl_expr_int (arg_expr)) >= TYPE_PRECISION (type))) |