forked from OSchip/llvm-project
[TTI] Make assertion compatible with opaque pointers
Dropping the TODO here because it applies to all uses of this method.
This commit is contained in:
parent
3ee6f1a4fa
commit
cfb1cb4491
|
@ -857,9 +857,8 @@ public:
|
|||
ArrayRef<const Value *> Operands,
|
||||
TTI::TargetCostKind CostKind = TTI::TCK_SizeAndLatency) {
|
||||
assert(PointeeType && Ptr && "can't get GEPCost of nullptr");
|
||||
// TODO: will remove this when pointers have an opaque type.
|
||||
assert(Ptr->getType()->getScalarType()->getPointerElementType() ==
|
||||
PointeeType &&
|
||||
assert(cast<PointerType>(Ptr->getType()->getScalarType())
|
||||
->isOpaqueOrPointeeTypeMatches(PointeeType) &&
|
||||
"explicit pointee type doesn't match operand's pointee type");
|
||||
auto *BaseGV = dyn_cast<GlobalValue>(Ptr->stripPointerCasts());
|
||||
bool HasBaseReg = (BaseGV == nullptr);
|
||||
|
|
Loading…
Reference in New Issue