[llvm] r212194 - AArch64: Merge isa with dyn_cast

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Jul 2 10:26:40 PDT 2014


Author: dexonsmith
Date: Wed Jul  2 12:26:39 2014
New Revision: 212194

URL: http://llvm.org/viewvc/llvm-project?rev=212194&view=rev
Log:
AArch64: Merge isa with dyn_cast

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64AddressTypePromotion.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64AddressTypePromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64AddressTypePromotion.cpp?rev=212194&r1=212193&r2=212194&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64AddressTypePromotion.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64AddressTypePromotion.cpp Wed Jul  2 12:26:39 2014
@@ -267,8 +267,7 @@ AArch64AddressTypePromotion::propagateSi
     }
 
     // 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





More information about the llvm-commits mailing list