<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63363>63363</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM ERROR: Cannot select: t6: i1 = setcc t2, t4, setle:ch
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:Hexagon,
llvm:crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chfast
</td>
</tr>
</table>
<pre>
```
LLVM ERROR: Cannot select: t6: i1 = setcc t2, t4, setle:ch
t2: i1,ch = CopyFromReg t0, Register:i1 %2
t1: i1 = Register %2
t4: i1,ch = CopyFromReg t0, Register:i1 %3
t3: i1 = Register %3
In function: f
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 'Hexagon DAG->DAG Pattern Instruction Selection' on function '@f'
#0 0x000055e26dc0885f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x357585f)
#1 0x000055e26dc05fb4 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f87a3700420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007f87a31cd00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007f87a31ac859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x000055e26ae5ea88 llvm::SuffixTree::insertLeaf(llvm::SuffixTreeInternalNode&, unsigned int, unsigned int) (.cold) SuffixTree.cpp:0:0
#6 0x000055e26d9c793d llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x333493d)
#7 0x000055e26d9c987a llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x333687a)
#8 0x000055e26d9c3f40 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3330f40)
#9 0x000055e26d9d1794 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x333e794)
#10 0x000055e26d9d4e18 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3341e18)
#11 0x000055e26d9d6b12 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#12 0x000055e26bb3a31a llvm::HexagonDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x14a731a)
#13 0x000055e26ce9913e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#14 0x000055e26d42f0b1 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2d9c0b1)
#15 0x000055e26d42f2f9 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2d9c2f9)
#16 0x000055e26d42fb72 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2d9cb72)
#17 0x000055e26af1b734 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#18 0x000055e26ae63e86 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7d0e86)
```
```llvm
target triple = "hexagon-unknown-linux-gnu"
@G = external global i64
@G.1 = external global i1
@G.2 = external global i64
define void @f(i1 %0, i1 %1) {
BB:
%C3 = icmp sle i1 %0, %1
br label %BB1
BB1: ; preds = %BB1, %BB
%B = or i1 %C3, %C3
br i1 %B, label %BB1, label %BB3
BB3: ; preds = %BB1
ret void
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8mFtv67gRxz8N_ULYoEhdH_zgS5wNcNINkoMCfQooaiSrkUiBpHadb1-QkmPJm23SrbEHJ7bFy8xvhn_exI2pKwmwRtEWRfsF7-1R6bU4ltzYRa6K9zWKyfif7BHZ_Pjxz0d89_z86zNiG7zjUiqLDTQgrCuwsfusA4zYHhuwQmBLEd1hG7pPA7YBxDbiOFjDrtZ3QHQnjr7XTnXvB63aZ6iwJa7XM1S1saAR2zjLNKLn3hjbYOLw3HDWxoZ_wQObeGB_4mFs8yBx2UthayVdw3Ioffpxt3m5w6bP29pijvO-who6pS22Ch-t7QxiG0QPiB6q2h77fCVUi-ihaX47fy07rf7tEksPtTE9GEQPmMsC11I0fQHYHgELzc0R51y8Wc0FrAb3L5aLN1z0bee8-CKyQiR70qrSvMVcV30L0joIjOhBdc6LUG1XN6CXcOoapUG7sobLasmNAe1CNEure_mG6CGvpecUeKmcCd51zlBvu96uDF6e0njJTbs079LyE2L7WlpoMGI7o3otALG7ASxwYM-9lLWscMeNwYgmhzGl-MkVPHLJK4eTYCVxq4q-AddqZowmY_D0M4O_wIlXSuL95n6J2N1-c4-fuLWgJX6Qxup-cPfipezGcvB1HlrvLSSl-xqkgSgjmJwIISSKgMaFIGkaldgPINsgtjHvZvjxpGtp_ZD8dGOEaHpppPnvr8pYDbxFNHZirKVFNMOIpv_nwCC6JScWJVEalYhmF-7gijsq8xC_1JXkzS9cFo2zn44YQ7FZic5Jifi_D0N0NJSUacJZQkhICX591WCs0vCq7RhFU-eIHk5p_BqHy6aW_WlZyX6o6OxRAy9WRq2IJw7CkJIZL5u5CURBSI41rw18w75wlmNvOWSE5DPL4dwyF2mUYZ6rb5FPLFOaRtnMcjTNMYcIeJpOtPHSl2V9-qkBhudaunH8AbycqePS7EE6rfLmH6qAUSi99Kt3MSjm-tk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