[PATCH] D132839: [RISCV] Optimization for using compressed beqz and bnez PR#56391
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 15:05:47 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1304
+class BrccCompessOpt<CondCode Cond, RVInstB Inst> : Pat<(riscv_brcc GPR:$lhs, simm12_no6:$Constant, Cond, bb:$place),
+ (Inst (ADDI GPR:$lhs, (NegImm simm12:$Constant)), X0, bb:$place)>;
----------------
Please put the branch related code in the branch section of this file.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1311
+
+def OptForMinSize : Predicate<"MF ? MF->getFunction().hasMinSize() : false">;
+
----------------
When wouldn't we have a valid MF?
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1319
+}
/// Branches and jumps
----------------
Blank line before this comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132839/new/
https://reviews.llvm.org/D132839
More information about the llvm-commits
mailing list