re PR tree-optimization/82525 ([GRAPHITE] codegen error for modulo operations we...
authorRichard Biener <rguenther@suse.de>
Fri, 13 Oct 2017 06:59:13 +0000 (06:59 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 13 Oct 2017 06:59:13 +0000 (06:59 +0000)
commit1163f058761b9d4b93d0ada5cdb5a6bd3cb2665c
tree581e7ac190de1cea496c0d90c21b1324a5770339
parentcae827b1a1a2f02d08fa0602e1cdaf991a8248ea
re PR tree-optimization/82525 ([GRAPHITE] codegen error for modulo operations we cannot represent)

2017-10-13  Richard Biener  <rguenther@suse.de>

PR tree-optimization/82525
* graphite-isl-ast-to-gimple.c
(translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
out from ...
(translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
Fail code generation when we cannot represent the isl integer.
(binary_op_to_tree): Elide modulo operations that are no-ops
in the type we code generate.  Remove now superfluous code
generation errors.

* gcc.dg/graphite/id-30.c: New testcase.
* gfortran.dg/graphite/id-28.f90: Likewise.

From-SVN: r253706
gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/id-30.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/id-28.f90 [new file with mode: 0644]