Commit 9d0d0a5a by Segher Boessenkool Committed by Segher Boessenkool

ira: volatile asm's are not moveable (PR82602)

A volatile asm statement can not be moved (relative to other volatile
asm, etc.), but IRA would do it nevertheless.  This patch fixes it.


	PR rtl-optimization/82602
	* ira.c (rtx_moveable_p): Return false for volatile asm.

From-SVN: r253869
parent b04bebdb
2017-10-18 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/82602
* ira.c (rtx_moveable_p): Return false for volatile asm.
2017-10-18 Uros Bizjak <ubizjak@gmail.com>
PR target/82580
......@@ -4400,6 +4400,12 @@ rtx_moveable_p (rtx *loc, enum op_type type)
for a reason. */
return false;
case ASM_OPERANDS:
/* The same is true for volatile asm: it has unknown side effects, it
cannot be moved at will. */
if (MEM_VOLATILE_P (x))
return false;
default:
break;
}
......
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