We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7570d38 commit 7b15865Copy full SHA for 7b15865
llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
@@ -70,8 +70,7 @@ bool NVPTXLowerAlloca::runOnFunction(Function &F) {
70
for (auto &I : BB) {
71
if (auto allocaInst = dyn_cast<AllocaInst>(&I)) {
72
Changed = true;
73
- auto PTy = dyn_cast<PointerType>(allocaInst->getType());
74
- auto ETy = PTy->getElementType();
+ auto ETy = cast<PointerType>(allocaInst->getType())->getElementType();
75
auto LocalAddrTy = PointerType::get(ETy, ADDRESS_SPACE_LOCAL);
76
auto NewASCToLocal = new AddrSpaceCastInst(allocaInst, LocalAddrTy, "");
77
auto GenericAddrTy = PointerType::get(ETy, ADDRESS_SPACE_GENERIC);
0 commit comments