| Issue |
60924
|
| Summary |
[DAGCombine] ICE in combineMinNumMaxNum(...)
|
| Labels |
new issue
|
| Assignees |
mcinally
|
| Reporter |
mcinally
|
65420c8041f4 introduced an ICE in combineMinNumMaxNum(...) when combineMinNumMaxNumImpl(...) returns an SDValue().
Reproducer is:
```
[scrubbed]$ cat test.ll
define float @test_combinemaxnum(float %sub) #0 {
L.entry:
%maxnum1 = call float @llvm.maxnum.f32(float 0.000000e+00, float 0.000000e+00)
br label %L.LB21_850
L.LB21_850:
%neg1 = fneg fast float %maxnum1
%neg2 = fneg fast float %sub
%mask = fcmp fast ule float %maxnum1, %neg2
%maxnum2 = select i1 %mask, float %neg1, float %sub
ret float %maxnum2
}
declare dso_local float @llvm.maxnum.f32(float, float)
attributes #0 = { "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" }
[scrubbed]$ llc test.ll
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llc test.ll
1. Running pass 'Function Pass Manager' on module 'test.ll'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@test_combinemaxnum'
#0 0x00005582e44b7088 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (scrubbed/bin/llc+0x1999088)
#1 0x00005582e44b4ffe llvm::sys::RunSignalHandlers() (scrubbed/bin/llc+0x1996ffe)
#2 0x00005582e44b781d SignalHandler(int) Signals.cpp:0:0
#3 0x0000150233b15b20 __restore_rt sigaction.c:0:0
#4 0x00005582e42f74a8 llvm::SelectionDAG::getNode(unsigned int, llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SDNodeFlags) (scrubbed/bin/llc+0x17d94a8)
#5 0x00005582e422970f (anonymous namespace)::DAGCombiner::combineMinNumMaxNum(llvm::SDLoc const&, llvm::EVT, llvm::SDValue, llvm::SDValue, llvm::SDValue, llvm::SDValue, llvm::ISD::CondCode) DAGCombiner.cpp:0:0
#6 0x00005582e41dce5a (anonymous namespace)::DAGCombiner::visitSELECT(llvm::SDNode*) DAGCombiner.cpp:0:0
#7 0x00005582e41c42bc (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
#8 0x00005582e41c10b3 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level) (scrubbed/bin/llc+0x16a30b3)
#9 0x00005582e4326a7e llvm::SelectionDAGISel::CodeGenAndEmitDAG() (scrubbed/bin/llc+0x1808a7e)
#10 0x00005582e4326407 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (scrubbed/bin/llc+0x1808407)
#11 0x00005582e432416f llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (scrubbed/bin/llc+0x180616f)
#12 0x00005582e34a113f (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#13 0x00005582e3a840af llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (scrubbed/bin/llc+0xf660af)
#14 0x00005582e3e76aee llvm::FPPassManager::runOnFunction(llvm::Function&) (scrubbed/bin/llc+0x1358aee)
#15 0x00005582e3e7dd83 llvm::FPPassManager::runOnModule(llvm::Module&) (scrubbed/bin/llc+0x135fd83)
#16 0x00005582e3e7770d llvm::legacy::PassManagerImpl::run(llvm::Module&) (scrubbed/bin/llc+0x135970d)
#17 0x00005582e309ebfa main (scrubbed/bin/llc+0x580bfa)
#18 0x0000150232dbc493 __libc_start_main (/lib64/libc.so.6+0x23493)
#19 0x00005582e3099c1e _start (scrubbed/bin/llc+0x57bc1e)
Segmentation fault (core dumped)
```
There's currently a patch out for review (D144571) to correct this ICE, but filing an issue so that it can be backported to the release/16.x branch.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs