[PATCH] D76042: [PowerPC] Add the Uses of implicit register for the BCLRn instruction
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 21:06:51 PDT 2020
ZhangKang created this revision.
ZhangKang added reviewers: PowerPC, kbarton, hiraditya, nemanjai, jsji, steven.zhang.
ZhangKang added a project: LLVM.
Herald added subscribers: shchenz, wuzish.
We have `Uses = [LR, RM] ` for `BCLR`, but we don't have `Uses = [LR, RM] ` for BCLRn,
This patch is to add `Uses = [LR, RM] ` for the BCLRn instruction.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76042
Files:
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/early-ret.mir
Index: llvm/test/CodeGen/PowerPC/early-ret.mir
===================================================================
--- llvm/test/CodeGen/PowerPC/early-ret.mir
+++ 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
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ 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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76042.249822.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/93a5306a/attachment.bin>
More information about the llvm-commits
mailing list