Commit 4b3df265 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/91204 (ICE in expand_expr_real_2, at expr.c:9215 with -O3)

	PR target/91204
	* optabs.c (expand_unop): As fallback, expand ~op0 as op0 ^ -1.

	* gcc.c-torture/compile/pr91204.c: New test.

From-SVN: r273629
parent 7604f435
2019-07-20 Jakub Jelinek <jakub@redhat.com>
PR target/91204
* optabs.c (expand_unop): As fallback, expand ~op0 as op0 ^ -1.
2019-07-20 John David Anglin <danglin@gcc.gnu.org> 2019-07-20 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.h (hppa_profile_hook): Delete declaration. * config/pa/pa.h (hppa_profile_hook): Delete declaration.
......
...@@ -2972,6 +2972,17 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -2972,6 +2972,17 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target,
return target; return target;
} }
/* Emit ~op0 as op0 ^ -1. */
if (unoptab == one_cmpl_optab
&& (SCALAR_INT_MODE_P (mode) || GET_MODE_CLASS (mode) == MODE_VECTOR_INT)
&& optab_handler (xor_optab, mode) != CODE_FOR_nothing)
{
temp = expand_binop (mode, xor_optab, op0, CONSTM1_RTX (mode),
target, unsignedp, OPTAB_DIRECT);
if (temp)
return temp;
}
if (optab_to_code (unoptab) == NEG) if (optab_to_code (unoptab) == NEG)
{ {
/* Try negating floating point values by flipping the sign bit. */ /* Try negating floating point values by flipping the sign bit. */
......
2019-07-20 Jakub Jelinek <jakub@redhat.com> 2019-07-20 Jakub Jelinek <jakub@redhat.com>
PR target/91204
* gcc.c-torture/compile/pr91204.c: New test.
* c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording. * c-c++-common/gomp/cancel-1.c: Adjust expected diagnostic wording.
* c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent) * c-c++-common/gomp/clauses-1.c (foo, baz, bar): Add order(concurrent)
clause where allowed. Add combined constructs with loop with all clause where allowed. Add combined constructs with loop with all
......
/* PR target/91204 */
int a, b, c[64];
void
foo (void)
{
int i;
for (i = 2; i < 64; i++)
c[i] &= b ^ c[i] ^ c[i - 2];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment