| Index: src/IceCfg.cpp
|
| diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
|
| index a113b95d47948ddd03c1bbe7bd864c2aa3642bd5..531660bc703b9a53ff669c3477fd233806afc043 100644
|
| --- a/src/IceCfg.cpp
|
| +++ b/src/IceCfg.cpp
|
| @@ -747,6 +747,8 @@ void Cfg::processAllocas(bool SortAndCombine) {
|
| bool HasDynamicAllocation = false;
|
| for (Inst &Instr : EntryNode->getInsts()) {
|
| if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) {
|
| + if (Instr.isDeleted())
|
| + continue;
|
| uint32_t AlignmentParam = Alloca->getAlignInBytes();
|
| if (AlignmentParam > StackAlignment)
|
| HasLargeAlignment = true;
|
| @@ -769,7 +771,7 @@ void Cfg::processAllocas(bool SortAndCombine) {
|
| if (Node == EntryNode)
|
| continue;
|
| for (Inst &Instr : Node->getInsts()) {
|
| - if (llvm::isa<InstAlloca>(&Instr)) {
|
| + if (llvm::isa<InstAlloca>(&Instr) && !Instr.isDeleted()) {
|
| // Allocations outside the entry block require a frame pointer.
|
| HasDynamicAllocation = true;
|
| break;
|
| @@ -792,7 +794,7 @@ void Cfg::processAllocas(bool SortAndCombine) {
|
| uint32_t MaxAlignment = StackAlignment;
|
| for (Inst &Instr : EntryNode->getInsts()) {
|
| if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) {
|
| - if (!llvm::isa<Constant>(Alloca->getSizeInBytes()))
|
| + if (!llvm::isa<Constant>(Alloca->getSizeInBytes()) || Alloca->isDeleted())
|
| continue;
|
| uint32_t AlignmentParam = Alloca->getAlignInBytes();
|
| // For default align=0, set it to the real value 1, to avoid any
|
|
|