mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	[PM/AA] Switch to an early-exit. NFC. This was split out of another
change because the diff is *useless*. I assure you, I just switched to early-return in this function. Cleanup in preparation for my next commit, as requested in code review! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -2809,7 +2809,9 @@ namespace {
 | 
				
			|||||||
    if (isa<StoreInst>(I)) {
 | 
					    if (isa<StoreInst>(I)) {
 | 
				
			||||||
      AA->replaceWithNewValue(I, K);
 | 
					      AA->replaceWithNewValue(I, K);
 | 
				
			||||||
      AA->replaceWithNewValue(J, K);
 | 
					      AA->replaceWithNewValue(J, K);
 | 
				
			||||||
    } else {
 | 
					      return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Type *IType = I->getType();
 | 
					    Type *IType = I->getType();
 | 
				
			||||||
    Type *JType = J->getType();
 | 
					    Type *JType = J->getType();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2831,8 +2833,7 @@ namespace {
 | 
				
			|||||||
                                 getReplacementName(K, false, 1));
 | 
					                                 getReplacementName(K, false, 1));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      Value *CV0 = ConstantInt::get(Type::getInt32Ty(Context), 0);
 | 
					      Value *CV0 = ConstantInt::get(Type::getInt32Ty(Context), 0);
 | 
				
			||||||
        K1 = ExtractElementInst::Create(K, CV0,
 | 
					      K1 = ExtractElementInst::Create(K, CV0, getReplacementName(K, false, 1));
 | 
				
			||||||
                                          getReplacementName(K, false, 1));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (JType->isVectorTy()) {
 | 
					    if (JType->isVectorTy()) {
 | 
				
			||||||
@@ -2847,15 +2848,13 @@ namespace {
 | 
				
			|||||||
                                 getReplacementName(K, false, 2));
 | 
					                                 getReplacementName(K, false, 2));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      Value *CV1 = ConstantInt::get(Type::getInt32Ty(Context), numElem - 1);
 | 
					      Value *CV1 = ConstantInt::get(Type::getInt32Ty(Context), numElem - 1);
 | 
				
			||||||
        K2 = ExtractElementInst::Create(K, CV1,
 | 
					      K2 = ExtractElementInst::Create(K, CV1, getReplacementName(K, false, 2));
 | 
				
			||||||
                                          getReplacementName(K, false, 2));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    K1->insertAfter(K);
 | 
					    K1->insertAfter(K);
 | 
				
			||||||
    K2->insertAfter(K1);
 | 
					    K2->insertAfter(K1);
 | 
				
			||||||
    InsertionPt = K2;
 | 
					    InsertionPt = K2;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Move all uses of the function I (including pairing-induced uses) after J.
 | 
					  // Move all uses of the function I (including pairing-induced uses) after J.
 | 
				
			||||||
  bool BBVectorize::canMoveUsesOfIAfterJ(BasicBlock &BB,
 | 
					  bool BBVectorize::canMoveUsesOfIAfterJ(BasicBlock &BB,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user