File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -182,32 +182,10 @@ static bool hasUndefinedMergeOp(const MachineInstr &MI,
182
182
// lanes are undefined.
183
183
return true ;
184
184
185
- // If the tied operand is NoReg, an IMPLICIT_DEF, or a REG_SEQEUENCE whose
186
- // operands are solely IMPLICIT_DEFS, then the pass through lanes are
187
- // undefined.
185
+ // All undefined passthrus should be $noreg: see
186
+ // RISCVDAGToDAGISel::doPeepholeNoRegPassThru
188
187
const MachineOperand &UseMO = MI.getOperand (UseOpIdx);
189
- if (UseMO.getReg () == RISCV::NoRegister)
190
- return true ;
191
-
192
- if (UseMO.isUndef ())
193
- return true ;
194
- if (UseMO.getReg ().isPhysical ())
195
- return false ;
196
-
197
- if (MachineInstr *UseMI = MRI.getVRegDef (UseMO.getReg ())) {
198
- if (UseMI->isImplicitDef ())
199
- return true ;
200
-
201
- if (UseMI->isRegSequence ()) {
202
- for (unsigned i = 1 , e = UseMI->getNumOperands (); i < e; i += 2 ) {
203
- MachineInstr *SourceMI = MRI.getVRegDef (UseMI->getOperand (i).getReg ());
204
- if (!SourceMI || !SourceMI->isImplicitDef ())
205
- return false ;
206
- }
207
- return true ;
208
- }
209
- }
210
- return false ;
188
+ return UseMO.getReg () == RISCV::NoRegister || UseMO.isUndef ();
211
189
}
212
190
213
191
// / Which subfields of VL or VTYPE have values we need to preserve?
You can’t perform that action at this time.
0 commit comments