[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2021-07-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

Andrew Pinski  changed:

   What|Removed |Added

 CC||regehr at cs dot utah.edu

--- Comment #9 from Andrew Pinski  ---
*** Bug 35764 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2012-01-21 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #8 from Andrew Pinski pinskia at gcc dot gnu.org 2012-01-21 
20:18:48 UTC ---
Fixed.


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-11-08 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

--- Comment #7 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-11-08 
13:44:22 UTC ---
Author: ebotcazou
Date: Tue Nov  8 13:44:11 2011
New Revision: 181161

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=181161
Log:
PR rtl-optimization/47698
* ifcvt.c (noce_operand_ok): Move around comment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ifcvt.c


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-11-07 Thread kyukhin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

--- Comment #6 from Kirill Yukhin kyukhin at gcc dot gnu.org 2011-11-07 
08:42:00 UTC ---
Author: kyukhin
Date: Mon Nov  7 08:41:55 2011
New Revision: 181075

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=181075
Log:
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.


Added:
trunk/gcc/testsuite/gcc.target/i386/47698.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ifcvt.c
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-02-11 Thread us15 at os dot inf.tu-dresden.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

--- Comment #1 from Udo Steinberg us15 at os dot inf.tu-dresden.de 2011-02-11 
15:40:27 UTC ---
Created attachment 23308
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23308
Testcase


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-02-11 Thread us15 at os dot inf.tu-dresden.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

Udo Steinberg us15 at os dot inf.tu-dresden.de changed:

   What|Removed |Added

  Attachment #23308|0   |1
is obsolete||

--- Comment #2 from Udo Steinberg us15 at os dot inf.tu-dresden.de 2011-02-11 
15:42:30 UTC ---
Created attachment 23309
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23309
Testcase


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-02-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.02.11 16:34:48
 Ever Confirmed|0   |1
  Known to fail||4.3.4, 4.5.2, 4.6.0

--- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-02-11 
16:34:48 UTC ---
Confirmed.  C testcase:

extern volatile unsigned long mmio;
unsigned long foo(int cond)
{
  if (cond)
return mmio;
  return 0;
}


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-02-11 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

Michael Matz matz at gcc dot gnu.org changed:

   What|Removed |Added

 CC||matz at gcc dot gnu.org

--- Comment #4 from Michael Matz matz at gcc dot gnu.org 2011-02-11 17:05:57 
UTC ---
noce_operand_ok doesn't disregard volatile MEMs:

  /* We special-case memories, so handle any of them with
 no address side effects.  */
  if (MEM_P (op))
return ! side_effects_p (XEXP (op, 0));

But I don't see where we would handle volatile MEMs in any sensible
way.  We happily fiddle with such operands resulting in the problem.


[Bug rtl-optimization/47698] CMOV accessing volatile memory with read side effect

2011-02-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47698

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com 2011-02-11 17:48:43 
UTC ---
(In reply to comment #4)
 noce_operand_ok doesn't disregard volatile MEMs:
 
   /* We special-case memories, so handle any of them with
  no address side effects.  */
   if (MEM_P (op))
 return ! side_effects_p (XEXP (op, 0));
 
 But I don't see where we would handle volatile MEMs in any sensible
 way.  We happily fiddle with such operands resulting in the problem.

cmov pattern should disallow operand with volatile MEM.