[llvm] [RISCV][GISel] Move G_BRJT expansion to legalization (PR #73711)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 22:56:19 PST 2023


================
@@ -317,6 +318,61 @@ bool RISCVLegalizerInfo::legalizeShlAshrLshr(
   return true;
 }
 
+bool RISCVLegalizerInfo::legalizeBRJT(MachineInstr &MI,
+                                      MachineIRBuilder &MIRBuilder) const {
+  MachineRegisterInfo &MRI = *MIRBuilder.getMRI();
----------------
arsenm wrote:

For that kind of case I think we could just introduce a global isel variant of the same hook. It still saves a lot of common boilerplate 

https://github.com/llvm/llvm-project/pull/73711


More information about the llvm-commits mailing list