Partially reverted changes from r250686
authorElena Demikhovsky <elena.demikhovsky@intel.com>
Thu, 22 Oct 2015 06:20:29 +0000 (06:20 +0000)
committerElena Demikhovsky <elena.demikhovsky@intel.com>
Thu, 22 Oct 2015 06:20:29 +0000 (06:20 +0000)
Clang runtime failure was reported.
   Assertion failed: (isExtended() && "Type is not extended!"), function getTypeForEVT
I'll need to add a proper handling for PointerType in masked load/store intrinsics.

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

lib/Target/X86/X86TargetTransformInfo.cpp

index e69b713b8af720dbdc67cda6876774d99ece25d5..d4954d977ea0e937e6a338ae2bb84f68dc4d4faf 100644 (file)
@@ -1191,8 +1191,10 @@ int X86TTIImpl::getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
 
 bool X86TTIImpl::isLegalMaskedLoad(Type *DataTy) {
   Type *ScalarTy = DataTy->getScalarType();
-  int DataWidth = ScalarTy->isPointerTy() ? DL.getPointerSizeInBits() :
-    ScalarTy->getPrimitiveSizeInBits();
+  // TODO: Pointers should also be legal,
+  // but it requires additional support in composing intrinsics name.
+  // getPrimitiveSizeInBits() returns 0 for PointerType
+  int DataWidth = ScalarTy->getPrimitiveSizeInBits();
 
   return (DataWidth >= 32 && ST->hasAVX2());
 }