File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
llvm/utils/TableGen/Common Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -403,14 +403,18 @@ CodeGenRegister::computeSubRegs(CodeGenRegBank &RegBank) {
403
403
continue ;
404
404
405
405
// SR is composed of multiple sub-regs. Find their names in this register.
406
+ bool AnyArtificial = false ;
406
407
SmallVector<CodeGenSubRegIndex *, 8 > Parts;
407
408
for (unsigned j = 0 , e = SR->ExplicitSubRegs .size (); j != e; ++j) {
408
409
CodeGenSubRegIndex &I = *SR->ExplicitSubRegIndices [j];
409
- if (!I.Artificial )
410
- Parts.push_back (getSubRegIndex (SR->ExplicitSubRegs [j]));
410
+ if (I.Artificial ) {
411
+ AnyArtificial = true ;
412
+ break ;
413
+ }
414
+ Parts.push_back (getSubRegIndex (SR->ExplicitSubRegs [j]));
411
415
}
412
416
413
- if (Parts. size () != SR-> ExplicitSubRegs . size () )
417
+ if (AnyArtificial )
414
418
continue ;
415
419
416
420
// Offer this as an existing spelling for the concatenation of Parts.
You can’t perform that action at this time.
0 commit comments