[llvm] [RISCV][GISEL] instruction-select for G_SPLAT_VECTOR (PR #111193)

Tobias Stadler via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 13:15:54 PDT 2024


================
@@ -530,8 +530,9 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
   MachineFunction &MF = *MBB.getParent();
   MachineIRBuilder MIB(MI);
 
-  preISelLower(MI, MIB);
   const unsigned Opc = MI.getOpcode();
+  bool OpcWasGSplatVector = Opc == TargetOpcode::G_SPLAT_VECTOR;
+  preISelLower(MI, MIB);
 
----------------
tobias-stadler wrote:

The Opc needs to be loaded after preISelLower in case the opcode is changed by preISelLower

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


More information about the llvm-commits mailing list