Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/IR/Type.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | if ((isX86_AMXTy() && isa<FixedVectorType>(Ty)) && | ||||
Ty->getPrimitiveSizeInBits().getFixedSize() == 8192) | Ty->getPrimitiveSizeInBits().getFixedSize() == 8192) | ||||
return true; | return true; | ||||
// At this point we have only various mismatches of the first class types | // At this point we have only various mismatches of the first class types | ||||
// remaining and ptr->ptr. Just select the lossless conversions. Everything | // remaining and ptr->ptr. Just select the lossless conversions. Everything | ||||
// else is not lossless. Conservatively assume we can't losslessly convert | // else is not lossless. Conservatively assume we can't losslessly convert | ||||
// between pointers with different address spaces. | // between pointers with different address spaces. | ||||
if (auto *PTy = dyn_cast<PointerType>(this)) { | if (auto *PTy = dyn_cast<PointerType>(this)) { | ||||
if (auto *OtherPTy = dyn_cast<PointerType>(Ty)) | if (auto *OtherPTy = dyn_cast<PointerType>(Ty)) { | ||||
// Don't bitcast "load <256 x i32>, <256 x i32>*" to | |||||
// "load x86_amx, x86_amx*", because we don't have a corresponding | |||||
// instruction to load x86_amx. Doing the transform causes trouble | |||||
// to lower "load x86_amx" instruction in backend. | |||||
if (OtherPTy->getElementType()->isX86_AMXTy()) | |||||
return false; | |||||
return PTy->getAddressSpace() == OtherPTy->getAddressSpace(); | return PTy->getAddressSpace() == OtherPTy->getAddressSpace(); | ||||
} | |||||
return false; | return false; | ||||
} | } | ||||
return false; // Other types have no identity values | return false; // Other types have no identity values | ||||
} | } | ||||
bool Type::isEmptyTy() const { | bool Type::isEmptyTy() const { | ||||
if (auto *ATy = dyn_cast<ArrayType>(this)) { | if (auto *ATy = dyn_cast<ArrayType>(this)) { | ||||
unsigned NumElements = ATy->getNumElements(); | unsigned NumElements = ATy->getNumElements(); | ||||
▲ Show 20 Lines • Show All 612 Lines • Show Last 20 Lines |