<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114670>114670</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Assertion `DAG.isGuaranteedNotToBeUndefOrPoison(R, false) && "Can't create node that may be undef/poison!"' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
TatyanaDoubts
</td>
</tr>
</table>
<pre>
To reproduce run llc with the following test
```
; ModuleID = 'reduced.ll'
source_filename = "reduced.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32-ni:1-p2:32:8:8:32-ni:2"
target triple = "aarch64-none-linux-gnu"
define void @widget(i64 %arg) gc "statepoint-example" {
bb:
%call = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call1 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call2 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call3 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call4 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call5 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call6 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call7 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call8 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call9 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (ptr addrspace(1))) null, i32 1, i32 0, ptr addrspace(1) null, i32 0, i32 0)
%call10 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(ptr addrspace(1) (i64, i64, i64, ptr)) null, i32 4, i32 0, i64 0, i64 0, i64 0, ptr null, i32 0, i32 0)
%call11 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i32 (float)) null, i32 1, i32 0, float 0.000000e+00, i32 0, i32 0)
%call12 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i64 (double)) null, i32 1, i32 0, double 0.000000e+00, i32 0, i32 0)
br label %bb14
bb13: ; preds = %bb14
ret void
bb14: ; preds = %bb14, %bb
%icmp = icmp samesign ult i64 %arg, 7
%select = select i1 %icmp, i32 0, i32 -7
%freeze = freeze i32 %select
%mul = mul i32 %freeze, 1
%icmp15 = icmp eq i32 %mul, 0
br i1 %icmp15, label %bb13, label %bb14
}
declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)
```
Stack dump
```
llc: /root/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16156: llvm::SDValue {anonymous}::DAGCombiner::visitFREEZE(llvm::SDNode*): Assertion `DAG.isGuaranteedNotToBeUndefOrPoison(R, false) && "Can't create node that may be undef/poison!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'AArch64 Instruction Selection' on function '@widget'
#0 0x0000000003bbb558 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3bbb558)
#1 0x0000000003bb8f4c SignalHandler(int) Signals.cpp:0:0
#2 0x000074e1e5a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x000074e1e5a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x000074e1e5a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x000074e1e5a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x000074e1e5a2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x000074e1e5a39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x00000000037f17df (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x37f17df)
#9 0x00000000038094df (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*) DAGCombiner.cpp:0:0
#10 0x000000000380bc0c (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
#11 0x000000000380d4f8 (anonymous namespace)::DAGCombiner::Run(llvm::CombineLevel) DAGCombiner.cpp:0:0
#12 0x000000000380fdaa llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOptLevel) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x380fdaa)
#13 0x00000000039712f8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39712f8)
#14 0x0000000003974c52 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3974c52)
#15 0x0000000003975f70 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3975f70)
#16 0x0000000003966a7f llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3966a7f)
#17 0x0000000002b32d99 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#18 0x000000000312e300 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x312e300)
#19 0x000000000312e6b1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x312e6b1)
#20 0x000000000312ef67 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x312ef67)
#21 0x000000000086d18c compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#22 0x0000000000757b66 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x757b66)
#23 0x000074e1e5a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#24 0x000074e1e5a29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#25 0x0000000000863e9e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x863e9e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWl1v2zrS_jXMDWFBor4vfOHEcd4C7TlB07cXexNQ0sjmhiK1JNUm--sXJGVHstMP7wl2A2yM1CLFmWeeGY5EcmqqNdsKgCVKL1G6vqCD2Um1_ELNExV0LYfK6ItKNk_LLxIr6JVshhqwGgTmvMbfmdlhswPcSs7ldya22IA2KFyjcIWycPzz3fgSf5LNwOHDGqN4jRHJFVi4JuAckdyLaTmoGu5bxkHQDkZJMpUkXtJQtQWDG2oop09yMHtZWHQoXsGiJ3mI4lVM3JftRvOubWWJ-1qwAsWrwg-xKEPxyn3Z3kEkIlYgIsVCxF53cWd7GxGThWB2bNGTvY0JoBsjx8yNYj0_eEipqndZshBSwIIzMTwutmI46PjvBlomAH-TrMEoCb-zZgsGkYJlCUYkpWqLSIm3tQXUhhroJRNmAY-06zkgQjDKLz1UVaF4RMVWt6acOy6uYeQDCOyREbnCLCb20hs16Y2XIAisVZSEnH_rAnjsQbEOhKE82NbBM4-gD0eu4ajuG71RGDhYFfPUAyKFd5AUdoQ2jdI9re39CJHS_2Ex2FzwKNEJ3LHSTHxqvTwKQfQ_HIMxBOTNhOBFL_4raRG_x-QkJsl7TE5ikr7H5CQm2XtMTmKSv8fkJCbFe0xOYlK-x-R0ixa--aDs2cwujtRJYJK5ywejJw1r67dD9Ha2sXYIkaLlkppf5oWTwmEQug8gchmGv-Xv29mz-qNY0cihsieuXzjsxc7xuFKY0wq4db2qomR6PKyqKEbxCp_zsefyXkGjx4PoBBRjBcYdNo-M2APxDxTJlW9OJojVXe9kXEPTDjTbCjxwg6fn1iucT5Q0cKj9kX5ssmgPdhKfxVSzVQD_9MfqselTcIScSHaDP_Ha6yjjNSxudORBlD77AP_Yy3eDm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