diff options
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 4e19ec32a3a..e90db4803ee 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5102,6 +5102,13 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { return nullptr; } + // Static allocas are handled more efficiently in the variable frame index + // side table. + const auto *AI = + dyn_cast<AllocaInst>(Address->stripInBoundsConstantOffsets()); + if (AI && AI->isStaticAlloca() && FuncInfo.StaticAllocaMap.count(AI)) + return nullptr; + // Byval arguments with frame indices were already handled after argument // lowering and before isel. const auto *Arg = |

