diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -1512,11 +1512,12 @@ def BCn : BForm_4<16, 4, 0, 0, (outs), (ins crbitrc:$bi, condbrtarget:$dst), "bc 4, $bi, $dst">; - let isReturn = 1, Uses = [LR, RM] in + let isReturn = 1, Uses = [LR, RM] in { def BCLR : XLForm_2_br2<19, 16, 12, 0, (outs), (ins crbitrc:$bi), "bclr 12, $bi, 0", IIC_BrB, []>; def BCLRn : XLForm_2_br2<19, 16, 4, 0, (outs), (ins crbitrc:$bi), "bclr 4, $bi, 0", IIC_BrB, []>; + } } let isReturn = 1, Defs = [CTR], Uses = [CTR, LR, RM] in { diff --git a/llvm/test/CodeGen/PowerPC/early-ret.mir b/llvm/test/CodeGen/PowerPC/early-ret.mir --- a/llvm/test/CodeGen/PowerPC/early-ret.mir +++ b/llvm/test/CodeGen/PowerPC/early-ret.mir @@ -32,7 +32,7 @@ ; CHECK-LABEL: name: testBCLRn ; CHECK: bb.0.entry: ; CHECK: renamable $cr0 = FCMPUS killed renamable $f3, killed renamable $f4 - ; CHECK: BCLRn $cr0eq, implicit $lr, implicit $rm, implicit killed $v2 + ; CHECK: BCLRn $cr0eq, implicit $lr, implicit $rm, implicit $lr, implicit $rm, implicit killed $v2 ; CHECK: bb.1.entry: ; CHECK: renamable $cr0 = FCMPUS killed renamable $f1, killed renamable $f2 ; CHECK: BCLR killed renamable $cr0eq, implicit $lr, implicit $rm, implicit killed $v2