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: r253870
This commit is contained in:
Segher Boessenkool 2017-10-18 23:13:16 +02:00 committed by Segher Boessenkool
parent 9aae1b1f15
commit b0a9b256be
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/82556

View File

@ -4406,6 +4406,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;
}