File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -151,14 +151,15 @@ bool SIInstrInfo::resultDependsOnExec(const MachineInstr &MI) const {
151151 // Ignore comparisons which are only used masked with exec.
152152 // This allows some hoisting/sinking of VALU comparisons.
153153 if (MI.isCompare ()) {
154- const MachineRegisterInfo &MRI = MI.getParent ()->getParent ()->getRegInfo ();
155154 const MachineOperand *Dst = getNamedOperand (MI, AMDGPU::OpName::sdst);
156155 if (!Dst)
157156 return true ;
158157
159158 Register DstReg = Dst->getReg ();
160159 if (!DstReg.isVirtual ())
161160 return true ;
161+
162+ const MachineRegisterInfo &MRI = MI.getParent ()->getParent ()->getRegInfo ();
162163 for (MachineInstr &Use : MRI.use_nodbg_instructions (DstReg)) {
163164 switch (Use.getOpcode ()) {
164165 case AMDGPU::S_AND_SAVEEXEC_B32:
You can’t perform that action at this time.
0 commit comments