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: r253871
+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-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82549
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;
}