We have Uses = [LR, RM] for BCLR, but we don't have Uses = [LR, RM] for BCLRn,
The instruction BCLRn is a Branch Conditional to LR instruction, it's obvious that it will use the [LR].
In the file PPCRegisterInfo.td:
244 // FP rounding mode: bits 30 and 31 of the FP status and control register 245 // This is not allocated as a normal register; it appears only in 246 // Uses and Defs. The ABI says it needs to be preserved by a function, 247 // but this is not achieved by saving and restoring it as with 248 // most registers, it has to be done in code; to make this work all the 249 // return and call instructions are described as Uses of RM, so instructions 250 // that do nothing but change RM will not get deleted. 251 def RM: PPCReg<"**ROUNDING MODE**">; 252
We use [RM] for all return and call instructions, this method is a hack to preserve Rounding Mode by a function call. So BCLRn should add the use of [RM].
This patch is to add Uses = [LR, RM] for the BCLRn instruction.