mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
Simplify some GEP checks in the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e413e9c94
commit
b95d1ff437
@ -1315,11 +1315,9 @@ void Verifier::visitShuffleVectorInst(ShuffleVectorInst &SV) {
|
||||
}
|
||||
|
||||
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||
Type *TargetTy = GEP.getPointerOperandType();
|
||||
if (VectorType *VTy = dyn_cast<VectorType>(TargetTy))
|
||||
TargetTy = VTy->getElementType();
|
||||
Type *TargetTy = GEP.getPointerOperandType()->getScalarType();
|
||||
|
||||
Assert1(dyn_cast<PointerType>(TargetTy),
|
||||
Assert1(isa<PointerType>(TargetTy),
|
||||
"GEP base pointer is not a vector or a vector of pointers", &GEP);
|
||||
Assert1(cast<PointerType>(TargetTy)->getElementType()->isSized(),
|
||||
"GEP into unsized type!", &GEP);
|
||||
|
Loading…
Reference in New Issue
Block a user