mirror of git://gcc.gnu.org/git/gcc.git
re PR rtl-optimization/47698 (CMOV accessing volatile memory with read side effect)
gcc/ PR rtl-optimization/47698 * ifconv.c (noce_operand_ok): prevent CMOV generation for volatile mem. gcc/testsuite/ PR rtl-optimization/47698 * gcc.target/i386/47698.c: New test. From-SVN: r181075
This commit is contained in:
parent
f7a57cdc35
commit
b3242a4c75
|
|
@ -1,3 +1,9 @@
|
||||||
|
2011-11-07 Sergey Ostanevich <sergos.gnu@gmail.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/47698
|
||||||
|
* ifconv.c (noce_operand_ok): prevent CMOV generation
|
||||||
|
for volatile mem.
|
||||||
|
|
||||||
2011-11-07 Tristan Gingold <gingold@adacore.com>
|
2011-11-07 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* common/config/alpha/alpha-common.c (alpha_option_init_struct):
|
* common/config/alpha/alpha-common.c (alpha_option_init_struct):
|
||||||
|
|
|
||||||
|
|
@ -2329,12 +2329,12 @@ noce_operand_ok (const_rtx op)
|
||||||
{
|
{
|
||||||
/* We special-case memories, so handle any of them with
|
/* We special-case memories, so handle any of them with
|
||||||
no address side effects. */
|
no address side effects. */
|
||||||
if (MEM_P (op))
|
|
||||||
return ! side_effects_p (XEXP (op, 0));
|
|
||||||
|
|
||||||
if (side_effects_p (op))
|
if (side_effects_p (op))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (MEM_P (op))
|
||||||
|
return ! side_effects_p (XEXP (op, 0));
|
||||||
|
|
||||||
return ! may_trap_p (op);
|
return ! may_trap_p (op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
|
||||||
|
2011-11-07 Sergey Ostanevich <sergos.gnu@gmail.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/47698
|
||||||
|
* gcc.target/i386/47698.c: New test.
|
||||||
|
|
||||||
2011-11-06 Jason Merrill <jason@redhat.com>
|
2011-11-06 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/35688
|
PR c++/35688
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/* { dg-options "-Os" } */
|
||||||
|
/* { dg-final { scan-assembler-not "cmov" } } */
|
||||||
|
|
||||||
|
extern volatile unsigned long mmio;
|
||||||
|
unsigned long foo(int cond)
|
||||||
|
{
|
||||||
|
if (cond)
|
||||||
|
return mmio;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue