re PR tree-optimization/68431 (Regression in GCC-6.0.0's optimizer)
PR tree-optimization/68431 * tree-vrp.c (extract_range_from_binary_expr_1): Fix condition. * gcc.dg/tree-ssa/pr68431.c: New test. From-SVN: r230608
This commit is contained in:
parent
8504d5dd8e
commit
41bfbbb68a
4 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-11-19 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR tree-optimization/68431
|
||||
* tree-vrp.c (extract_range_from_binary_expr_1): Fix condition.
|
||||
|
||||
2015-11-19 Nathan Sidwell <nathanacm.org>
|
||||
|
||||
* config/nvptx/nvptx.md (atomic_compare_and_swap<mode>_1,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-11-19 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR tree-optimization/68431
|
||||
* gcc.dg/tree-ssa/pr68431.c: New test.
|
||||
|
||||
2015-11-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/68376
|
||||
|
|
16
gcc/testsuite/gcc.dg/tree-ssa/pr68431.c
Normal file
16
gcc/testsuite/gcc.dg/tree-ssa/pr68431.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* PR tree-optimization/68431 */
|
||||
/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
|
||||
|
||||
unsigned int x = 1;
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
long long int a = -2LL;
|
||||
int t = 1 <= (a / x);
|
||||
if (t != 0)
|
||||
__builtin_abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "Folding predicate .*to 0" 1 "vrp1" } } */
|
|
@ -2975,7 +2975,7 @@ extract_range_from_binary_expr_1 (value_range *vr,
|
|||
if (vr1.type == VR_RANGE
|
||||
&& !symbolic_range_p (&vr0)
|
||||
&& !symbolic_range_p (&vr1)
|
||||
&& !compare_values (vr1.min, zero))
|
||||
&& compare_values (vr1.min, zero) != 0)
|
||||
max = int_const_binop (code, vr0.max, vr1.min);
|
||||
else
|
||||
max = zero;
|
||||
|
|
Loading…
Add table
Reference in a new issue