Skip to content

[X86][FastISel] assertion converting i15 to float with avx512f feature #68068

Closed
@jacobly0

Description

@jacobly0
target triple = "x86_64"

define float @f() "target-features"="+avx512f" { ; no assertion when disabled
  %1 = uitofp i15 poison to float
  ret float %1
}
$ llc --version # 33e14ecd6aac8c61c055921dd6e564d170fe34d6
LLVM (http://llvm.org/):
  LLVM version 17.0.2
  DEBUG build with assertions.
$ llc -fast-isel=1 repro.ll
llc: llvm/include/llvm/CodeGen/ValueTypes.h:300: MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' 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 -fast-isel=1 repro.ll
1.	Running pass 'Function Pass Manager' on module 'repro.ll'.
2.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
 #0 0x00007f192b811b36 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) llvm/lib/Support/Unix/Signals.inc:602:11
 #1 0x00007f192b81208b PrintStackTraceSignalHandler(void*) llvm/lib/Support/Unix/Signals.inc:675:1
 #2 0x00007f192b810233 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:104:5
 #3 0x00007f192b812771 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x00007f192b05ec90 (/usr/lib64/libc.so.6+0x39c90)
 #5 0x00007f192b0af1ec (/usr/lib64/libc.so.6+0x8a1ec)
 #6 0x00007f192b05ebe2 gsignal (/usr/lib64/libc.so.6+0x39be2)
 #7 0x00007f192b0474ed abort (/usr/lib64/libc.so.6+0x224ed)
 #8 0x00007f192b047415 (/usr/lib64/libc.so.6+0x22415)
 #9 0x00007f192b057542 (/usr/lib64/libc.so.6+0x32542)
#10 0x00007f1932f7fae9 llvm::EVT::getSimpleVT() const llvm/include/llvm/CodeGen/ValueTypes.h:0:7
#11 0x00007f1932f811f0 llvm::TargetLoweringBase::getSimpleValueType(llvm::DataLayout const&, llvm::Type*, bool) const llvm/include/llvm/CodeGen/TargetLowering.h:1569:47
#12 0x00007f1932f02713 (anonymous namespace)::X86FastISel::X86SelectIntToFP(llvm::Instruction const*, bool) llvm/lib/Target/X86/X86FastISel.cpp:2394:19
#13 0x00007f1932efd3cf (anonymous namespace)::X86FastISel::X86SelectUIToFP(llvm::Instruction const*) llvm/lib/Target/X86/X86FastISel.cpp:2441:3
#14 0x00007f1932eebf03 (anonymous namespace)::X86FastISel::fastSelectInstruction(llvm::Instruction const*) llvm/lib/Target/X86/X86FastISel.cpp:3665:5
#15 0x00007f192fc5e403 llvm::FastISel::selectInstruction(llvm::Instruction const*) llvm/lib/CodeGen/SelectionDAG/FastISel.cpp:1559:7
#16 0x00007f192ff73a5a llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1578:13
#17 0x00007f192ff71990 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:482:3
#18 0x00007f1933002ca7 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:192:7
#19 0x00007f192f21358c llvm::MachineFunctionPass::runOnFunction(llvm::Function&) llvm/lib/CodeGen/MachineFunctionPass.cpp:91:8
#20 0x00007f192c4e2b85 llvm::FPPassManager::runOnFunction(llvm::Function&) llvm/lib/IR/LegacyPassManager.cpp:1435:23
#21 0x00007f192c4e80bf llvm::FPPassManager::runOnModule(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:1481:16
#22 0x00007f192c4e34fb (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:1550:23
#23 0x00007f192c4e300a llvm::legacy::PassManagerImpl::run(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:535:16
#24 0x00007f192c4e83c1 llvm::legacy::PassManager::run(llvm::Module&) llvm/lib/IR/LegacyPassManager.cpp:1677:3
#25 0x0000564d056cce4f compileModule(char**, llvm::LLVMContext&) llvm/tools/llc/llc.cpp:754:41
#26 0x0000564d056cb0b5 main llvm/tools/llc/llc.cpp:416:13
#27 0x00007f192b048eea (/usr/lib64/libc.so.6+0x23eea)
#28 0x00007f192b048fa5 __libc_start_main (/usr/lib64/libc.so.6+0x23fa5)
#29 0x0000564d056ca891 _start (llc+0x2e891)
Aborted (core dumped)

Metadata

Metadata

Assignees

Labels

backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions