Skip to content

Commit c585712

Browse files
fixup! opc needs to be loaded after preISelLower
1 parent 5d77932 commit c585712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
530530
MachineFunction &MF = *MBB.getParent();
531531
MachineIRBuilder MIB(MI);
532532

533-
const unsigned Opc = MI.getOpcode();
534-
bool OpcWasGSplatVector = Opc == TargetOpcode::G_SPLAT_VECTOR;
533+
bool OpcWasGSplatVector = MI.getOpcode() == TargetOpcode::G_SPLAT_VECTOR;
535534
preISelLower(MI, MIB);
535+
const unsigned Opc = MI.getOpcode();
536536

537537
if (!MI.isPreISelOpcode() || Opc == TargetOpcode::G_PHI) {
538538
if (Opc == TargetOpcode::PHI || Opc == TargetOpcode::G_PHI) {

0 commit comments

Comments
 (0)