Use isSingleValueType instead of isFirstClassType to
authorDan Gohman <gohman@apple.com>
Fri, 23 May 2008 01:52:21 +0000 (01:52 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 23 May 2008 01:52:21 +0000 (01:52 +0000)
exclude struct and array types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51467 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index c35bc49e512c026bc6e75dd17bcff00b31adb5b7..084f874f921fb6f6bf00b90adb560edf4e708d8e 100644 (file)
@@ -9030,7 +9030,7 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) {
     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 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) {
           break;
       }
       
-      if (SrcETy->isFirstClassType())
+      if (SrcETy->isSingleValueType())
         NewPtrTy = PointerType::getUnqual(SrcETy);
     }
   }