Issue 243382
Summary [X86][DAG] llvm.fptoui.sat.i32.f16 crashed with avx10.2
Labels backend:X86, crash-on-valid, llvm:SelectionDAG
Assignees
Reporter Andarwinux
    https://godbolt.org/z/YjoP3oYGv
```llvm
define i32 @test_unsigned_i32_f16(half %f) nounwind {
 %x = call i32 @llvm.fptoui.sat.i32.f16(half %f)
  ret i32 %x
}
```
llc -mattr=+avx10.2
```
LLVM ERROR: Cannot select: t4: i32 = fp_to_uint_sat t2, ValueType:ch:i32
  t2: f16,ch = CopyFromReg t0, Register:f16 %0
In function: test_unsigned_i32_f16
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -mattr=+avx10.2 <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@test_unsigned_i32_f16'
 #0 0x00000000008475d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8475d8)
 #1 0x00000000008443c4 llvm::sys::RunSignalHandlers() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8443c4)
 #2 0x000000000084453e SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x000077d9b4a45330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x000077d9b4a9ec0c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9ec0c)
 #5 0x000077d9b4a4527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
 #6 0x000077d9b4a288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #7 0x00000000007ca445 (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7ca445)
 #8 0x00000000039d21c9 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39d21c9)
 #9 0x00000000039dc8dd llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int, unsigned char const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39dc8dd)
#10 0x00000000027038a2 (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) X86ISelDAGToDAG.cpp:0:0
#11 0x00000000039d5344 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39d5344)
#12 0x00000000039e30c8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39e30c8)
#13 0x00000000039e6956 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39e6956)
#14 0x00000000039e7ffc llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39e7ffc)
#15 0x00000000039d074e llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39d074e)
#16 0x0000000003d9ad7f llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#17 0x0000000005829953 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x5829953)
#18 0x0000000005829d91 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x5829d91)
#19 0x000000000582a759 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x582a759)
#20 0x000000000090a0c2 compileModule(char**, llvm::SmallVectorImpl<llvm::PassPlugin>&, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) llcdriver.cpp:0:0
#21 0x000000000090b2ab llcMain (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x90b2ab)
#22 0x00000000007cfebc main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7cfebc)
#23 0x000077d9b4a2a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
#24 0x000077d9b4a2a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
#25 0x0000000000826265 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x826265)
Program terminated with signal SIGABRT (6)
Compiler returned: 134
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to