diff options
author | Sergey Ostanevich <sergos.gnu@gmail.com> | 2011-11-07 08:41:55 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2011-11-07 08:41:55 +0000 |
commit | b3242a4c75342dc2a5260fd452b9ea5c9d604296 (patch) | |
tree | 7650728bd04ee3bd9438a80a18a47d5899ab0896 /gcc/ifcvt.c | |
parent | f7a57cdc352bda43281423b933e4d3cb0edc9ddc (diff) | |
download | gcc-b3242a4c75342dc2a5260fd452b9ea5c9d604296.zip gcc-b3242a4c75342dc2a5260fd452b9ea5c9d604296.tar.gz gcc-b3242a4c75342dc2a5260fd452b9ea5c9d604296.tar.bz2 |
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
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 784e2e8..3b05c2a 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2329,12 +2329,12 @@ noce_operand_ok (const_rtx op) { /* 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)); - if (side_effects_p (op)) return FALSE; + if (MEM_P (op)) + return ! side_effects_p (XEXP (op, 0)); + return ! may_trap_p (op); } |