re PR middle-end/91725 (ICE in get_nonzero_bits starting with r275587)
PR middle-end/91725 * match.pd ((A / (1 << B)) -> (A >> B)): Call tree_nonzero_bits instead of get_nonzero_bits, only call it for integral types. * gcc.c-torture/compile/pr91725.c: New test. From-SVN: r275633
This commit is contained in:
parent
dc5b11916a
commit
6d5093dad6
@ -1,3 +1,9 @@
|
||||
2019-09-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/91725
|
||||
* match.pd ((A / (1 << B)) -> (A >> B)): Call tree_nonzero_bits instead
|
||||
of get_nonzero_bits, only call it for integral types.
|
||||
|
||||
2019-09-11 Richard Biener <rguenther@suse.de>
|
||||
|
||||
Revert
|
||||
|
@ -325,9 +325,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
|
||||
&& (TYPE_UNSIGNED (TREE_TYPE (@1))
|
||||
|| (element_precision (type)
|
||||
== element_precision (TREE_TYPE (@1)))
|
||||
|| (get_nonzero_bits (@0)
|
||||
& wi::mask (element_precision (TREE_TYPE (@1)) - 1, true,
|
||||
element_precision (type))) == 0))))
|
||||
|| (INTEGRAL_TYPE_P (type)
|
||||
&& (tree_nonzero_bits (@0)
|
||||
& wi::mask (element_precision (TREE_TYPE (@1)) - 1,
|
||||
true,
|
||||
element_precision (type))) == 0)))))
|
||||
(rshift @0 @2)))
|
||||
|
||||
/* Preserve explicit divisions by 0: the C++ front-end wants to detect
|
||||
|
@ -1,3 +1,8 @@
|
||||
2019-09-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/91725
|
||||
* gcc.c-torture/compile/pr91725.c: New test.
|
||||
|
||||
2019-09-11 Richard Biener <rguenther@suse.de>
|
||||
|
||||
Revert
|
||||
|
7
gcc/testsuite/gcc.c-torture/compile/pr91725.c
Normal file
7
gcc/testsuite/gcc.c-torture/compile/pr91725.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* PR middle-end/91725 */
|
||||
|
||||
unsigned long long
|
||||
foo (unsigned long long x, unsigned long long y, int z)
|
||||
{
|
||||
return (x + y) / (1 << z);
|
||||
}
|
Loading…
Reference in New Issue
Block a user