mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
GlobalISel: Fix else after return
This commit is contained in:
parent
5bfa8527db
commit
da2a7c6759
@ -24,15 +24,21 @@ LLT llvm::getLLTForType(Type &Ty, const DataLayout &DL) {
|
||||
if (NumElements == 1)
|
||||
return ScalarTy;
|
||||
return LLT::vector(NumElements, ScalarTy);
|
||||
} else if (auto PTy = dyn_cast<PointerType>(&Ty)) {
|
||||
return LLT::pointer(PTy->getAddressSpace(), DL.getTypeSizeInBits(&Ty));
|
||||
} else if (Ty.isSized()) {
|
||||
}
|
||||
|
||||
if (auto PTy = dyn_cast<PointerType>(&Ty)) {
|
||||
unsigned AddrSpace = PTy->getAddressSpace();
|
||||
return LLT::pointer(AddrSpace, DL.getPointerSizeInBits(AddrSpace));
|
||||
}
|
||||
|
||||
if (Ty.isSized()) {
|
||||
// Aggregates are no different from real scalars as far as GlobalISel is
|
||||
// concerned.
|
||||
auto SizeInBits = DL.getTypeSizeInBits(&Ty);
|
||||
assert(SizeInBits != 0 && "invalid zero-sized type");
|
||||
return LLT::scalar(SizeInBits);
|
||||
}
|
||||
|
||||
return LLT();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user