[PATCH] D128428: [LoongArch] Add codegen support for conditional branches
Ray Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 19:14:29 PDT 2022
wangleiat added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/LoongArchInstrInfo.td:195
class BrCC_2RI16<bits<6> op, string opstr>
- : Fmt2RI16<op, (outs), (ins GPR:$rj, GPR:$rd, simm16_lsl2:$imm16), opstr,
+ : Fmt2RI16<op, (outs), (ins GPR:$rj, GPR:$rd, simm16_lsl2_br:$imm16), opstr,
"$rj, $rd, $imm16"> {
----------------
xen0n wrote:
> Could you explain a bit on why this is needed? I can't easily understand this as the only change is on the "guard" of said definition but the dropped check seems too important to ignore. (Maybe because I haven't looked at LLVM source code as hard as you did.)
Sorry, I also do not understand.
I had to change simm26ls12, simm21ls12 and simm16lsl12_br to inherit from the Operand<OtherVT> class rather than Operand<GRLenVT> in order to keep `tablegen` happy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128428/new/
https://reviews.llvm.org/D128428
More information about the llvm-commits
mailing list