[llvm-commits] [llvm] r51467 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Dan Gohman gohman at apple.com
Thu May 22 18:52:21 PDT 2008


Author: djg
Date: Thu May 22 20:52:21 2008
New Revision: 51467

URL: http://llvm.org/viewvc/llvm-project?rev=51467&view=rev
Log:
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51467&r1=51466&r2=51467&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 20:52:21 2008
@@ -9030,7 +9030,7 @@
     if (SrcETy->isSized() && TD->getTypeStoreSize(SrcETy) == Size) {
       // The SrcETy might be something like {{{double}}} or [1 x double].  Rip
       // down through these levels if so.
-      while (!SrcETy->isFirstClassType()) {
+      while (!SrcETy->isSingleValueType()) {
         if (const StructType *STy = dyn_cast<StructType>(SrcETy)) {
           if (STy->getNumElements() == 1)
             SrcETy = STy->getElementType(0);
@@ -9045,7 +9045,7 @@
           break;
       }
       
-      if (SrcETy->isFirstClassType())
+      if (SrcETy->isSingleValueType())
         NewPtrTy = PointerType::getUnqual(SrcETy);
     }
   }





More information about the llvm-commits mailing list