mirror of git://gcc.gnu.org/git/gcc.git
re PR rtl-optimization/64957 (wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu)
PR rtl-optimization/64957 PR debug/64817 * simplify-rtx.c (simplify_binary_operation_1): Use ~cval for IOR rather than for AND. * gcc.c-torture/execute/pr64957.c: New test. From-SVN: r220475
This commit is contained in:
parent
e3a7c6cf72
commit
d26ac279bc
|
|
@ -1,3 +1,10 @@
|
||||||
|
2015-02-06 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/64957
|
||||||
|
PR debug/64817
|
||||||
|
* simplify-rtx.c (simplify_binary_operation_1): Use ~cval for
|
||||||
|
IOR rather than for AND.
|
||||||
|
|
||||||
2015-02-06 Eric Botcazou <ebotcazou@adacore.com>
|
2015-02-06 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
PR target/62631
|
PR target/62631
|
||||||
|
|
|
||||||
|
|
@ -2731,9 +2731,9 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode,
|
||||||
HOST_WIDE_INT xcval;
|
HOST_WIDE_INT xcval;
|
||||||
|
|
||||||
if (op == IOR)
|
if (op == IOR)
|
||||||
xcval = cval;
|
|
||||||
else
|
|
||||||
xcval = ~cval;
|
xcval = ~cval;
|
||||||
|
else
|
||||||
|
xcval = cval;
|
||||||
|
|
||||||
return simplify_gen_binary (XOR, mode,
|
return simplify_gen_binary (XOR, mode,
|
||||||
simplify_gen_binary (op, mode, a, c),
|
simplify_gen_binary (op, mode, a, c),
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-02-06 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/64957
|
||||||
|
PR debug/64817
|
||||||
|
* gcc.c-torture/execute/pr64957.c: New test.
|
||||||
|
|
||||||
2015-02-05 Jeff Law <law@redhat.com>
|
2015-02-05 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
PR target/17306
|
PR target/17306
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* PR rtl-optimization/64957 */
|
||||||
|
|
||||||
|
__attribute__((noinline, noclone)) int
|
||||||
|
foo (int b)
|
||||||
|
{
|
||||||
|
return (((b ^ 5) | 1) ^ 5) | 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((noinline, noclone)) int
|
||||||
|
bar (int b)
|
||||||
|
{
|
||||||
|
return (((b ^ ~5) & ~1) ^ ~5) & ~1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 16; i++)
|
||||||
|
if (foo (i) != (i | 1) || bar (i) != (i & ~1))
|
||||||
|
__builtin_abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue