[PATCH] D149776: Re-land "[AMDGPU] Define data layout entries for buffers""
Jay Foad via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 08:47:01 PDT 2023
foad added a comment.
Hi, with the new datalayout we're hitting this crash:
; RUN: opt -passes=indvars -S < %s
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8"
target triple = "amdgcn--amdpal"
define void @f(ptr addrspace(7) %arg) {
bb:
br label %bb1
bb1:
%i = getelementptr i32, ptr addrspace(7) %arg, i32 2
br i1 false, label %bb2, label %bb1
bb2:
br label %bb3
bb3:
%i4 = load i32, ptr addrspace(7) %i, align 4
br label %bb3
}
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/jayfoad2/llvm-release/bin/opt -passes=indvars -S
#0 0x00000000063a25e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/jayfoad2/llvm-release/bin/opt+0x63a25e7)
#1 0x00000000063a049e llvm::sys::RunSignalHandlers() (/home/jayfoad2/llvm-release/bin/opt+0x63a049e)
#2 0x00000000063a2c8a SignalHandler(int) Signals.cpp:0:0
#3 0x00007fdb0be42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x0000000005b0b80f llvm::EVT::isExtendedVector() const (/home/jayfoad2/llvm-release/bin/opt+0x5b0b80f)
#5 0x0000000005a59bf9 llvm::TargetLoweringBase::getTypeConversion(llvm::LLVMContext&, llvm::EVT) const (/home/jayfoad2/llvm-release/bin/opt+0x5a59bf9)
#6 0x000000000423cf63 llvm::BasicTTIImplBase<llvm::GCNTTIImpl>::getTypeLegalizationCost(llvm::Type*) const AMDGPUTargetMachine.cpp:0:0
#7 0x0000000004305117 llvm::GCNTTIImpl::getArithmeticInstrCost(unsigned int, llvm::Type*, llvm::TargetTransformInfo::TargetCostKind, llvm::TargetTransformInfo::OperandValueInfo, llvm::TargetTransformInfo::OperandValueInfo, llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) AMDGPUTargetTransformInfo.cpp:0:0
#8 0x0000000005549453 llvm::TargetTransformInfo::getArithmeticInstrCost(unsigned int, llvm::Type*, llvm::TargetTransformInfo::TargetCostKind, llvm::TargetTransformInfo::OperandValueInfo, llvm::TargetTransformInfo::OperandValueInfo, llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) const (/home/jayfoad2/llvm-release/bin/opt+0x5549453)
#9 0x00000000064b5695 llvm::SCEVExpander::isHighCostExpansionHelper(llvm::SCEVOperand const&, llvm::Loop*, llvm::Instruction const&, llvm::InstructionCost&, unsigned int, llvm::TargetTransformInfo const&, llvm::SmallPtrSetImpl<llvm::SCEV const*>&, llvm::SmallVectorImpl<llvm::SCEVOperand>&) (/home/jayfoad2/llvm-release/bin/opt+0x64b5695)
#10 0x0000000006475d2b llvm::SCEVExpander::isHighCostExpansion(llvm::ArrayRef<llvm::SCEV const*>, llvm::Loop*, unsigned int, llvm::TargetTransformInfo const*, llvm::Instruction const*) LoopUnrollRuntime.cpp:0:0
#11 0x00000000064813ab llvm::rewriteLoopExitValues(llvm::Loop*, llvm::LoopInfo*, llvm::TargetLibraryInfo*, llvm::ScalarEvolution*, llvm::TargetTransformInfo const*, llvm::SCEVExpander&, llvm::DominatorTree*, llvm::ReplaceExitVal, llvm::SmallVector<llvm::WeakTrackingVH, 16u>&) (/home/jayfoad2/llvm-release/bin/opt+0x64813ab)
#12 0x0000000006a71b09 (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) IndVarSimplify.cpp:0:0
#13 0x0000000006a70000 llvm::IndVarSimplifyPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (/home/jayfoad2/llvm-release/bin/opt+0x6a70000)
#14 0x00000000065bef0d llvm::detail::PassModel<llvm::Loop, llvm::IndVarSimplifyPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) PassBuilder.cpp:0:0
#15 0x000000000679b933 std::optional<llvm::PreservedAnalyses> llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runSinglePass<llvm::Loop, std::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>>>>(llvm::Loop&, std::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>>>&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&, llvm::PassInstrumentation&) (/home/jayfoad2/llvm-release/bin/opt+0x679b933)
#16 0x000000000679b5a2 llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runWithoutLoopNestPasses(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (/home/jayfoad2/llvm-release/bin/opt+0x679b5a2)
#17 0x000000000679ab88 llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (/home/jayfoad2/llvm-release/bin/opt+0x679ab88)
#18 0x000000000659ddbd llvm::detail::PassModel<llvm::Loop, llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) PassBuilder.cpp:0:0
#19 0x000000000679c97f llvm::FunctionToLoopPassAdaptor::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/jayfoad2/llvm-release/bin/opt+0x679c97f)
#20 0x00000000065be45d llvm::detail::PassModel<llvm::Function, llvm::FunctionToLoopPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#21 0x0000000005d408a4 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/jayfoad2/llvm-release/bin/opt+0x5d408a4)
#22 0x000000000423519d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) AMDGPUTargetMachine.cpp:0:0
#23 0x0000000005d4473e llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/jayfoad2/llvm-release/bin/opt+0x5d4473e)
#24 0x0000000004234f4d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) AMDGPUTargetMachine.cpp:0:0
#25 0x0000000005d3fab4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/jayfoad2/llvm-release/bin/opt+0x5d3fab4)
#26 0x0000000003dc9b1b llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) (/home/jayfoad2/llvm-release/bin/opt+0x3dc9b1b)
#27 0x0000000003dd9149 main (/home/jayfoad2/llvm-release/bin/opt+0x3dd9149)
#28 0x00007fdb0be29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#29 0x00007fdb0be29e40 call_init ./csu/../csu/libc-start.c:128:20
#30 0x00007fdb0be29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#31 0x0000000003dc2ee5 _start (/home/jayfoad2/llvm-release/bin/opt+0x3dc2ee5)
Segmentation fault (core dumped)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149776/new/
https://reviews.llvm.org/D149776
More information about the cfe-commits
mailing list