-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Description
opt -p lower-matrix-intrinsics on the IR below crashes (https://llvm.godbolt.org/z/13EM3Wfb5)
declare <8 x i32> @llvm.matrix.transpose.v8i32(<8 x i32>, i32 immarg, i32 immarg) #0
declare <1 x i32> @llvm.matrix.multiply.v1i32.v8i32.v8i32(<8 x i32>, <8 x i32>, i32 immarg, i32 immarg, i32 immarg) #0
define void @test(ptr %p, <8 x i32> %x) {
%l = load <8 x i32>, ptr %p, align 4
%t = tail call <8 x i32> @llvm.matrix.transpose.v8i32(<8 x i32> %x, i32 1, i32 8)
%m = tail call <1 x i32> @llvm.matrix.multiply.v1i32.v8i32.v8i32(<8 x i32> %l, <8 x i32> %t, i32 1, i32 8, i32 1)
%e = extractelement <1 x i32> %m, i64 0
store i32 %e, ptr %p, align 4
ret void
}
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S -passes=lower-matrix-intrinsics <source>
1. Running pass "function(lower-matrix-intrinsics<>)" on module "<source>"
2. Running pass "lower-matrix-intrinsics<>" on function "test"
#0 0x00000000051ca038 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x51ca038)
#1 0x00000000051c7a2c SignalHandler(int) Signals.cpp:0:0
#2 0x00007e6703042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x0000000004f2919e llvm::Instruction::eraseFromParent() (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4f2919e)
#4 0x0000000003eb1ea0 (anonymous namespace)::LowerMatrixIntrinsics::Visit() LowerMatrixIntrinsics.cpp:0:0
#5 0x0000000003eb2b55 llvm::LowerMatrixIntrinsicsPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x3eb2b55)
#6 0x0000000002fdc35e llvm::detail::PassModel<llvm::Function, llvm::LowerMatrixIntrinsicsPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x2fdc35e)
#7 0x0000000004fc9688 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4fc9688)
#8 0x0000000000e45c8e llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xe45c8e)
#9 0x0000000004fc80ae llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4fc80ae)
#10 0x0000000000e4533e llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0xe4533e)
#11 0x0000000004fc7ae0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4fc7ae0)
#12 0x000000000090f90a llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x90f90a)
#13 0x0000000000901fa9 optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x901fa9)
#14 0x00007e6703029d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#15 0x00007e6703029e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#16 0x00000000008f97fe _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x8f97fe)
Program terminated with signal: SIGSEGV
Compiler returned: 139
Metadata
Metadata
Assignees
Type
Projects
Status
Done