[PATCH] D130769: [RISCV] Combine and remove redundant ADD/SUB instructions

Elena Lepilkina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 04:39:16 PDT 2022


eklepilkina marked 7 inline comments as done.
eklepilkina added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp:243
+  if (TM->getOptLevel() != CodeGenOpt::None)
+    addPass(createRISCVAddSubCombinerPass());
 }
----------------
craig.topper wrote:
> Should this be done before branch folding since it removes instructions which could reduce jump distance?
This impossible, because `BranchFolder` is set in pipeline before `TailDuplicationPass` that combines these redundant instructions in one BB.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130769/new/

https://reviews.llvm.org/D130769



More information about the llvm-commits mailing list