Open phoebewang opened 1 year ago
Small reproducer
target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32-a:0:32-S32" target triple = "i386-pc-windows-msvc19.33.31629" define dso_local x86_regcallcc void @foo(<8 x i32> %mask) #0 { entry: store <8 x i32> %mask, ptr poison, align 32 %wide.load = load <8 x i32>, ptr poison, align 32 %0 = icmp ne <8 x i32> %wide.load, zeroinitializer call void @llvm.masked.store.v8f64.p0(<8 x double> poison, ptr poison, i32 8, <8 x i1> %0) call void @llvm.masked.store.v8i32.p0(<8 x i32> poison, ptr poison, i32 32, <8 x i1> %0) ret void } declare void @llvm.masked.store.v8f64.p0(<8 x double>, ptr, i32, <8 x i1>) declare void @llvm.masked.store.v8i32.p0(<8 x i32>, ptr, i32, <8 x i1>) attributes #0 = { "target-features"="+avx2" } !llvm.module.flags = !{!0} !0 = !{i32 2, !"CodeView", i32 1}
$ llc < bugpoint-reduced-simplified.ll .text .def @feat.00; .scl 3; .type 0; .endef .globl @feat.00 .set @feat.00, 1 .file "<stdin>" llc: /export/users/pengfeiw/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp:2076: virtual void llvm::X86FrameLowering::emitPrologue(llvm::MachineFunction &, llvm::MachineBasicBlock &) const: Assertion `!NeedsWinFPO && "SEH_SaveXMM incompatible with FPO data"' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: llc 1. Running pass 'Function Pass Manager' on module '<stdin>'. 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@foo' #0 0x0000000008cb7bbd llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /export/users/pengfeiw/llvm-project/llvm/lib/Support/Unix/Signals.inc:602:11 #1 0x0000000008cb805b PrintStackTraceSignalHandler(void*) /export/users/pengfeiw/llvm-project/llvm/lib/Support/Unix/Signals.inc:675:1 #2 0x0000000008cb62d6 llvm::sys::RunSignalHandlers() /export/users/pengfeiw/llvm-project/llvm/lib/Support/Signals.cpp:104:5 #3 0x0000000008cb8875 SignalHandler(int) /export/users/pengfeiw/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1 #4 0x00007f54a2a6bdb0 __restore_rt (/lib64/libc.so.6+0x59db0) #5 0x00007f54a2ab842c __pthread_kill_implementation (/lib64/libc.so.6+0xa642c) #6 0x00007f54a2a6bd06 gsignal (/lib64/libc.so.6+0x59d06) #7 0x00007f54a2a3e7d3 abort (/lib64/libc.so.6+0x2c7d3) #8 0x00007f54a2a3e6fb _nl_load_domain.cold (/lib64/libc.so.6+0x2c6fb) #9 0x00007f54a2a64c86 (/lib64/libc.so.6+0x52c86) #10 0x0000000006c82e49 llvm::X86FrameLowering::emitPrologue(llvm::MachineFunction&, llvm::MachineBasicBlock&) const /export/users/pengfeiw/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp:2077:19 #11 0x0000000007d0605d (anonymous namespace)::PEI::insertPrologEpilogCode(llvm::MachineFunction&) /export/users/pengfeiw/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:1161:37 #12 0x0000000007d0391a (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /export/users/pengfeiw/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:266:18 #13 0x0000000007b0d385 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /export/users/pengfeiw/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:91:8 #14 0x000000000825bcba llvm::FPPassManager::runOnFunction(llvm::Function&) /export/users/pengfeiw/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1435:23 #15 0x0000000008260b02 llvm::FPPassManager::runOnModule(llvm::Module&) /export/users/pengfeiw/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1481:16 #16 0x000000000825c579 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /export/users/pengfeiw/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1550:23 #17 0x000000000825c0ed llvm::legacy::PassManagerImpl::run(llvm::Module&) /export/users/pengfeiw/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:535:16 #18 0x0000000008260de1 llvm::legacy::PassManager::run(llvm::Module&) /export/users/pengfeiw/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1677:3 #19 0x0000000004f8ca87 compileModule(char**, llvm::LLVMContext&) /export/users/pengfeiw/llvm-project/llvm/tools/llc/llc.cpp:754:41 #20 0x0000000004f8adcd main /export/users/pengfeiw/llvm-project/llvm/tools/llc/llc.cpp:416:13 #21 0x00007f54a2a56e50 __libc_start_call_main (/lib64/libc.so.6+0x44e50) #22 0x00007f54a2a56efc __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x44efc) #23 0x0000000004f8a5a5 _start (/export/users/pengfeiw/llvm-project/builds/bin/llc+0x4f8a5a5) Aborted (core dumped)
The assert was introduced since https://github.com/llvm/llvm-project/commit/9cdd4df81a5ec0652931bf1c2e3706b9d54188c7
@llvm/issue-subscribers-backend-x86
Small reproducer