[llvm] [SelectionDAG] Introducing a new ISD::POISON SDNode to represent the poison value in the IR. (PR #125883)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 09:38:01 PDT 2025


kuhar wrote:

Hi @diggerlin,

We've had an assertion failure on RISC-V after integrating this PR:
```
SoftPromoteHalfResult #0: t26: f16 = poison                                                                                                                    
                                                                                                                                                               
LLVM ERROR: Do not know how to soft promote this operator's result!                                                                                            
Please report issues to https://github.com/iree-org/iree/issues and include the crash backtrace.                                                               
Stack dump:                                                                                                                                                    
0.      Running pass 'Function Pass Manager' on module 'math_ops_llvm_cpu_linked'.                                                                             
1.      Running pass 'RISC-V DAG->DAG Pattern Instruction Selection' on function '@_test_rsqrt_f16_dispatch_0_elementwise_63_f16'                              
 #0 0x000076c9b086087e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:13                                                                                                                                                            
 #1 0x000076c9b085eb35 llvm::sys::RunSignalHandlers() /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/Support/Signals.cpp:106:18                       
 #2 0x000076c9b0860f5a SignalHandler(int, siginfo_t*, void*) /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3              
 #3 0x000076c9a9245330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)                                                                                               
 #4 0x000076c9a929eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76                                                                               
 #5 0x000076c9a929eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10                                                                                     
 #6 0x000076c9a929eb2c pthread_kill ./nptl/pthread_kill.c:89:10                                                                                                
 #7 0x000076c9a924527e raise ./signal/../sysdeps/posix/raise.c:27:6                                                                                            
 #8 0x000076c9a92288ff abort ./stdlib/abort.c:81:7                                                                                                             
 #9 0x000076c9b07be3d6 llvm::report_fatal_error(llvm::Twine const&, bool) /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/Support/ErrorHandling.cpp:126:5                                                                                                                                                             
#10 0x000076c9b07be219 (/home/jakub/iree/relass/lib/libIREECompiler.so+0x6dbe219)                                                                              
#11 0x000076c9b6d7c9aa (/home/jakub/iree/relass/lib/libIREECompiler.so+0xd37c9aa)                                                                              
#12 0x000076c9b6db62f7 llvm::DAGTypeLegalizer::run() /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:0:9        
#13 0x000076c9b6dba902 llvm::SelectionDAG::LegalizeTypes() /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1060:34                                                                                                                                                             
#14 0x000076c9b6ef3716 llvm::SelectionDAGISel::CodeGenAndEmitDAG() /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:979:23                                                                                                                                                   
#15 0x000076c9b6ef25fa llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/CodeGen/Sele
ctionDAG/SelectionDAGISel.cpp:1649:8                                                                                                                           
#16 0x000076c9b6eefc2f llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/jakub/iree/iree/third_party/llvm-project/llvm/lib/CodeGen/Sel
ectionDAG/SelectionDAGISel.cpp:0:3
```

https://github.com/llvm/llvm-project/pull/125883


More information about the llvm-commits mailing list