<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJy9mNty2zYQhp-GusFIQ4LnC13Ykp16Jk48sts0vdGAAEixIQGWABM5T98FSR0gK7Vrp_XIoojDjw-72AXITLLH-Y1GivNaIb0hGgkpOJI53HDFUSl0WwpVUoVIyxGhuiNV9YjKuql4zYXmzPEvHHfpuOP3FFXV13pWl6Ksu3qW-9jBi_NVUWCXk-2-y9nyXfvh-2FTKkRJzVHXoG8bLpBuH0tRIC0PeGYaaBwQEcHQKIbyTlBdSgEzRKtOaYBEG60bZaaDr-FTlHrTZTMqa7hpocm0IqIYf8Ol6aoKLqnnuskMfdqUdIMqTphCnTIMHZiPICe8rIkAox2YiBnXCZcOTl4_IlzzsuLKwT4r83waxIQlPs-561KSYM_nmKc0iVhEaeim3A2DMArjIA6hGfXSgJlbnPtenqRBHqxi35uu4sBzcDo7NjNMoJAsk5U-izxUzWRrOL_D_634TJLvnz_9BUKjQuSOn_72_fvfbtHVavVxBSpoQYSQZgFWnGpT4G7DkIUxC0nCfNeUwHpAjr9E-c53R02yPDGeOyqhNBnGQaftBiloDo4yegvZPF63sl7x4tAUM-L2klBaKs1b6NYD4NDd6drKqQW562Z1OMF7K4h3FoRGPwQZO9yI_bI3Ldd_fPBIoLnSXrzJIjdP8yiNw9hzOSdXQ5e791cX91dIdVldaljOWVegljey1WaJ_8PyNZE7XqZNK_803sXXpVKdWbPXfSyWglYd432M0paoDcoI_aJbQvm4BO81FCDW1c0-y7hQld61smgJRHRbdCakDARM9Fo2ZhQgaCA22infNpVswXRQZkJpqttOfIG7rBQ9HEVTafqRpjG9O910eqbQdJtEU6LqqXqEcN2COSEP8grsulCyayl3_NE-nqFZdUKYxNMQpUAtvt7lljtTcEsEKQxDjKColqyruGllieF4nDE-J_h7EqHlxbsptIQLuhEKJjIMcd8HjvHooL_Pa2aEwH3Gx9BmWEqQRlxYTC789QsqpVHmRTm6g-yvey88GLfcl4Ug1S_g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f-ihofLeNm_3YKy4aWAec0VLyc967wH_Ruug-ps>53353</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Cannot select llvm.{min,max}imum.{f32,f64}
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Urgau
</td>
</tr>
</table>
<pre>
It seems that none of these intrinsics are actually implemented:
- llvm.minimum.f32,
- llvm.minimum.f64
- llvm.maximum.f32
- llvm.maximum.f64
This came up when trying to implement the minimum and maximum function in Rust, https://github.com/rust-lang/rust/pull/91008. Which leads us to use a [manual implementation](https://github.com/rust-lang/rust/pull/91008/files#diff-47ad83efe00ca8213e2e9c86d6cc509e0545657475d83c194d56572f31f894f4R731-R741).
[godbolt](https://godbolt.org/z/MnYa8zYWq)
```
LLVM ERROR: Cannot select: 0x55d57d5a8d30: f32 = fmaximum 0x55d57d5a8bf8, 0x55d57d5a8cc8
0x55d57d5a8bf8: f32,ch = CopyFromReg 0x55d57d52da08, Register:f32 %0
0x55d57d5a8b90: f32 = Register %0
0x55d57d5a8cc8: f32,ch = CopyFromReg 0x55d57d52da08, Register:f32 %1
0x55d57d5a8c60: f32 = Register %1
In function: _ZN1a4test17hb60f9f6975710eeaE
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-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN1a4test17hb60f9f6975710eeaE'
#0 0x000055d579c6b16f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000055d579c68a2d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f10dfdc83c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#3 0x00007f10df89718b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4618b)
#4 0x00007f10df876859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x25859)
#5 0x000055d579bafd18 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2bafd18)
#6 0x000055d579a7bec6 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a7bec6)
#7 0x000055d579a7eea2 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a7eea2)
#8 0x000055d5787d91ff (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) X86ISelDAGToDAG.cpp:0:0
#9 0x000055d579a7aa24 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a7aa24)
#10 0x000055d579a823a6 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a823a6)
#11 0x000055d579a85c5c llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a85c5c)
#12 0x000055d579a87b92 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.886) SelectionDAGISel.cpp:0:0
#13 0x000055d5787e12c0 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#14 0x000055d57908cc58 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x208cc58)
#15 0x000055d5794ca629 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x24ca629)
#16 0x000055d5794ca8c1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x24ca8c1)
#17 0x000055d5794cbb37 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x24cbb37)
#18 0x000055d57796d0d5 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#19 0x000055d57789606e main (/opt/compiler-explorer/clang-trunk/bin/llc+0x89606e)
#20 0x00007f10df8780b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#21 0x000055d5779646ca _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x9646ca)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9WNly2zYU_RrqBSMNCO4PerAlO_VMnHhkt2n6ogFBkGJDAiwBJnK-vhcktUBWatdO65ElEcu55664UCqzx_mNRorzWiG9oRoJKTiSOTxwxVEpdFsKVTKFaMsRZbqjVfWIyrqpeM2F5pnjXTh46eDxfYqq6ms9q0tR1l09yz3ikMX5qdC3x-l2v-Xs-G798P6wKRVitOaoa9C3DRdIt4-lKJCWB3pGDTQKRFRkaARDeSeYLqUADdGqUxpIoo3WjTLqkGt4FaXedOmMyRoeWlgyragoxu_w0XRVBR-Ji3E8Q582JdugitNMoU4ZDh2YjyInuKypAKMdOFEj1wmWDolfLxE-87LiyiFeVub51I9oFns85xgzGhPX44QnLA6zkLEAJxwHfhAGkR8FsIy5iZ-ZR5J7bh4nfu6vIs-driLfdUgyOzYzKFDILJWVPkt5mJrJ1vD8Dv-34jONv3_-9BcAjQghHl_94_v3v92iq9Xq4wpQ0IIKIU0AVpxpM4C3QZAFURbQOPOwGYF4QI63RPnOd0dL0jw2njsaYSwe5KDTdQMULAdHGbyFbB6vW1mveHFYSjKKe0gYLZXmLWzrCZAA73Bt5MQiudtmbTih91Yi7lkiLPwhkXHDjdiHvVm5_uODS33NlXajTRriPMnDJAoiF3NOr4Ytd--vLu6vkOrSutQQzmlXoJY3stUmxP8hfE3mjh_TppV_Gu-S61KpzsTsdZ-LpWBVl_E-R1lL1QallH3RLWV8DMF7DQMo6-pmX2UwTCV3rSxaChndF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