AArch64: Merge isa with dyn_cast
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 2 Jul 2014 17:26:39 +0000 (17:26 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 2 Jul 2014 17:26:39 +0000 (17:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212194 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64AddressTypePromotion.cpp

index 9ebb73437b6a806a862fa1107cccc6acc4fe75dc..85ea46b72da4785a8b9cdf9fb603cdc21721ade7 100644 (file)
@@ -267,8 +267,7 @@ AArch64AddressTypePromotion::propagateSignExtension(Instructions &SExtInsts) {
     }
 
     // Now try to get through the chain of definitions.
-    while (isa<Instruction>(SExt->getOperand(0))) {
-      Instruction *Inst = dyn_cast<Instruction>(SExt->getOperand(0));
+    while (auto *Inst = dyn_cast<Instruction>(SExt->getOperand(0))) {
       DEBUG(dbgs() << "Try to get through:\n" << *Inst << '\n');
       if (!canGetThrough(Inst) || !shouldGetThrough(Inst)) {
         // We cannot get through something that is not an Instruction