In the case where inline asm's input operands are assigned values,
targets may opt to emit an error when a reserved register is used for
such operands. This is the case for Arm.
The current code, however, emits an error even when the reserved
register, when used as an input operand, is only read from. This is a
bug.
This patch adds additional checks to emit error only when a reserved
register used as an input operand is actually written to. The criteria
used is to check whether or not the input operand value, which is the
value to be loaded into the input, is undef. When this is the case, the
assignment is optimized away and therefore the reserved register ends up
not being written to.