Commit 634c3ff0 by Vladimir Makarov Committed by Vladimir Makarov

re PR target/84112 (powerpc64le ICE in LRA on openjdk)

2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/84112
	* lra-constraints.c (curr_insn_transform): Process AND in the
	address.

2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/84112
	* pr84112.c: New.

From-SVN: r257204
parent c5370327
2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR target/84112
* lra-constraints.c (curr_insn_transform): Process AND in the
address.
2018-01-30 Jakub Jelinek <jakub@redhat.com> 2018-01-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83986 PR rtl-optimization/83986
......
...@@ -4216,7 +4216,17 @@ curr_insn_transform (bool check_only_p) ...@@ -4216,7 +4216,17 @@ curr_insn_transform (bool check_only_p)
GET_MODE_SIZE (GET_MODE (op))); GET_MODE_SIZE (GET_MODE (op)));
else if (get_reload_reg (OP_IN, Pmode, *loc, rclass, FALSE, else if (get_reload_reg (OP_IN, Pmode, *loc, rclass, FALSE,
"offsetable address", &new_reg)) "offsetable address", &new_reg))
lra_emit_move (new_reg, *loc); {
rtx addr = *loc;
enum rtx_code code = GET_CODE (addr);
if (code == AND && CONST_INT_P (XEXP (addr, 1)))
/* (and ... (const_int -X)) is used to align to X bytes. */
addr = XEXP (*loc, 0);
lra_emit_move (new_reg, addr);
if (addr != *loc)
emit_move_insn (new_reg, gen_rtx_AND (GET_MODE (new_reg), new_reg, XEXP (*loc, 1)));
}
before = get_insns (); before = get_insns ();
end_sequence (); end_sequence ();
*loc = new_reg; *loc = new_reg;
......
2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR target/84112
* pr84112.c: New.
2018-01-30 Jakub Jelinek <jakub@redhat.com> 2018-01-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83986 PR rtl-optimization/83986
......
/* { dg-do compile { target powerpc*-*-* } }*/
/* { dg-options "-mcpu=power8 -O3 -fstack-protector-strong -fpic" } */
char *b;
int c, d, e, f;
void
foo (char *h, int k, int l, int m, int j, int q)
{
char *i = b;
int n = d;
int s = e;
while (c)
{
for (; j <= 0; j += 12)
{
i[j] = n & k - h[j] >> 31 | q & ~(k - h[j] >> 31);
i[j + 1] = n & l - h[j + 1] >> 31 | q & ~(l - h[j + 1] >> 31);
i[j + 2] = n & m - h[j + 2] >> 31 | s & ~(m - h[j + 2] >> 31);
i[j + 3] = n & k - h[j + 3] >> 31 | q & ~(k - h[j + 3] >> 31);
i[j + 4] = n & l - h[j + 4] >> 31 | q & ~(l - h[j + 4] >> 31);
i[j + 5] = n & m - h[j + 5] >> 31 | s & ~(m - h[j + 5] >> 31);
i[j + 6] = n & k - h[j + 6] >> 31 | q & ~(k - h[j + 6] >> 31);
i[j + 7] = n & l - h[j + 7] >> 31 | q & ~(l - h[j + 7] >> 31);
i[j + 8] = n & m - h[j + 8] >> 31 | s & ~(m - h[j + 8] >> 31);
i[j + 9] = n & k - h[j + 9] >> 31 | q & ~(k - h[j + 9] >> 31);
i[j + 10] = n & l - h[j + 10] >> 31 | q & ~(l - h[j + 10] >> 31);
i[j + 11] = n & m - h[j + 11] >> 31 | s & ~(m - h[j + 11] >> 31);
}
while (j < f)
;
}
}
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