<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJytWVlzo7oS_jXOiwoXq4GHPDjOclInmUzFmeXcF5cQwmYCkg-ILPfX30_CG7aZODU3FbNIrU9ft1otqUlk-n4-pSUnvKpkRV5ztSAD1ws8Ow4H9uXAHpOJLJd5wUmWVzyTb2QwQt3QHjp4aBuoRS7I3dPDsG3BxUteSVFyoQbeuC17mOJRN6UVW5AiF80bXlYNiuKlHLgTwgoq5oSKlBRFSl54VedSrNo53qrLtsnk6zddcSsULwZu9DhwYxCtOJ6f7vVLHlp-GNtECwJ6QetXXhSrxtd345s1IavUlAbepaAqf-HEKlUj-M77g0usZb7EUyaktSwUHvgb40sFdjVeaP0u2AIay6a2GvGai9RSNCk4Kn8s0bt1Obt-eHy6vf5nNn349ji5AjpAf2SyKingfhjjo7AtsGrOmipX78CuFWXP1rKSijMlK6tW6Ge-qYDF6sW6GnRQwbKd9629fv7cVXrg-q0Rtgxv7m4vIDUbT6dX4PrwZbppfHfZMdiPQrd4cPTVqmWlLCbLEp3pd1pbgvOUp_rtv7hUvKjk-kXI1-0jf-PMqLHp6PHb9KnT1YTIpbIK_oJRNjabEEWrOUeXy2YzRpv27XWaC8ZJ0uRFmsNWa781rvr15kG7g1oYf64VWdK6Jsy4uBbWQrJRG5fWwtohwaB614Vzktfk4W9dnkAOUhoLIyYhpcFQ09LoTA0t_7rQ0wjdPGsYkC7y5K0phrU0IzLZoZFRiKYt5ULOa5LwAqZbzyYt3_6bV89FjecNQ5vc3X2_J1ePjw-P2oQTKoRUYFfAHXRBLlSVizpnmOSBnnbDt2g0pLwWub5ywQ4Qv95djadXpG6SMleEQus5qfgSw06UJAullrXm5V7jH3X10MDKao53YzqMRtGk3NiJVfBXkmDMVUUZHx70NtX-QNKmXG6U3anVASN-bITQNjIjN3DD60a0vv9VF9xTQee8QjlBUSnTBjbHm2EHj8B95RB4qiu2fbdWUc29lskvXGGZ2cjHhH6G1wrL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9fkguBgEl2d_3mV-7tqu_vft2PYDf8izUZJmccwZ8xMPUd23eYkptMnqn1XnBlKn-lFZwOG3Kf8znEr0QsXXDFWuCn7-xx8lzgztc8P5f-8Oe7o>54055</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aesenc
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
smsxgli
</td>
</tr>
</table>
<pre>
Same error with #53097
Compile firefox `97.0.1` with thin LTO.
environment:
OS: `arch linux`.
llvm, clang and lld version: `13.0.1`
CPU: Intel(R) Core(TM) i7-4790 CPU, haswell
CFLAGS: `-march=native -mtune=native -O2 -pipe -fno-plt -fexceptions -fasynchronous-unwind-tables -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-protector-strong -fstack-clash-protection -fcf-protection`
CXXFLAGS: `$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS`
LDFLAGS: `-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now,-z,noexecstack`
RUSTFLAGS: `-C opt-level=2 -C target-cpu=native`
Since building firefox with PGO, the first pass compiling without thin LTO, and everything is OK, but in the second pass,
with thin LTO, while linking `libxul.so`, compiling failed with logs below:
```
32:33.70 LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aesenc
32:33.70 PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
32:33.70 Stack dump:
32:33.70 0. Running pass 'Function Pass Manager' on module '/build/firefox/src/firefox-97.0.1/obj/x86_64-unknown-linux-gnu/release/libgkrust.a(wgpu_hal-785fcf12e540c33d.wgpu_hal.c740af7d-cgu.0.rcgu.o at 76974238)'.
32:33.70 1. Running pass 'X86 DAG->DAG Instruction Selection' on function '@"_ZN9hashbrown3map24HashMap$LT$K$C$V$C$S$GT$7get_mut17ha3902d568de85cc9E"'
32:33.94 #0 0x00007fb5a629eea7 (/usr/lib/libLLVM-13.so+0xba6ea7)
32:33.94 #1 0x00007fb5a629c6a6 (/usr/lib/libLLVM-13.so+0xba46a6)
32:33.94 #2 0x00007fb5a5305560 __restore_rt libc_sigaction.c:0:0
32:33.94 #3 0x00007fb5a535234c __pthread_kill_implementation pthread_kill.c:0:0
32:33.94 #4 0x00007fb5a53054b8 gsignal (/usr/lib/libc.so.6+0x424b8)
32:33.94 #5 0x00007fb5a52ef534 abort (/usr/lib/libc.so.6+0x2c534)
32:33.94 #6 0x00007fb5a61b8858 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/libLLVM-13.so+0xac0858)
32:33.94 #7 0x00007fb5a61b89b4 (/usr/lib/libLLVM-13.so+0xac09b4)
32:33.94 #8 0x00007fb5a6c10e65 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/usr/lib/libLLVM-13.so+0x1518e65)
32:33.94 #9 0x00007fb5a6c1229a llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/usr/lib/libLLVM-13.so+0x151a29a)
32:33.94 #10 0x00007fb5a93b5f70 (/usr/lib/libLLVM-13.so+0x3cbdf70)
32:33.94 #11 0x00007fb5a6c0f9a7 llvm::SelectionDAGISel::DoInstructionSelection() (/usr/lib/libLLVM-13.so+0x15179a7)
32:33.94 #12 0x00007fb5a6c18749 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/lib/libLLVM-13.so+0x1520749)
32:33.94 #13 0x00007fb5a6c1b62f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/libLLVM-13.so+0x152362f)
32:33.94 #14 0x00007fb5a6c1df82 (/usr/lib/libLLVM-13.so+0x1525f82)
32:33.94 #15 0x00007fb5a93bfcc0 (/usr/lib/libLLVM-13.so+0x3cc7cc0)
32:33.94 #16 0x00007fb5a66cc1d9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/libLLVM-13.so+0xfd41d9)
32:33.94 #17 0x00007fb5a6404f50 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/libLLVM-13.so+0xd0cf50)
32:33.94 #18 0x00007fb5a64050c4 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/libLLVM-13.so+0xd0d0c4)
32:33.94 #19 0x00007fb5a6406a0a llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/libLLVM-13.so+0xd0ea0a)
32:33.94 #20 0x00007fb5a7c451b4 (/usr/lib/libLLVM-13.so+0x254d1b4)
32:33.94 #21 0x00007fb5a7c46404 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/usr/lib/libLLVM-13.so+0x254e404)
32:33.94 #22 0x00007fb5a7c2e50b (/usr/lib/libLLVM-13.so+0x253650b)
32:33.94 #23 0x00007fb5a621f786 (/usr/lib/libLLVM-13.so+0xb27786)
32:33.94 #24 0x00007fb5a61f8b6d (/usr/lib/libLLVM-13.so+0xb00b6d)
32:33.94 #25 0x00007fb5a5355788 __pthread_once_slow pthread_once.c:0:0
32:33.94 #26 0x00007fb5a62214a0 (/usr/lib/libLLVM-13.so+0xb294a0)
32:33.94 #27 0x00007fb5a53505c2 start_thread pthread_create.c:0:0
32:33.94 #28 0x00007fb5a53d5584 __clone (/usr/lib/libc.so.6+0x112584)
32:34.17 clang-13: error: unable to execute command: Aborted (core dumped)
32:34.17 clang-13: error: linker command failed due to signal (use -v to see invocation)
```
I am afraid that this question exist since llvm 12.
What's more, I have an laptop with Intel(R) Core(TM) i7-11800H CPU, which is tiger lake architecture, while building this with same configuration (I am quiet sure about it, since I build them in "clean build" , so called in arch development, using `systemd-nspawn` to get a clean build root), and no error like this.
I open a new issue here because i do not know to reopen #53097.
@phoebewang
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytWVlzo7oS_jXOiwoXZjHwkAfHWU7qJJOpOLOc--ISQthMQOKAyHJ__f0kvGGbiVNzUzGL1Pr0davVkppYJu_nM1pwwqtKVuQ1U0sycFzftaNgYF8O7AmZyqLMck7SrOKpfCODMeqG9nCEh7aBWmaC3D09DNsWXLxklRQFF2rgTtqyhxkedVNasSXJM9G84WXVIM9fioEzJSynYkGoSEieJ-SFV3UmxardyF112TaZfv2mK26F4vnACR8HTgSiFcfz071-yQLLCyKbaEFAL2n9yvN81fj6bnKzJmQVmtLAvRRUZS-cWIVqBN95f3CIVWYlnlIhrTJXeOBvjJcK7Gq80PpdsCU0lk1tNeI1E4mlaJxzVP4o0bt1Ob9-eHy6vf5nPnv49ji9AjpAf6SyKijgfhjjo7AtsGrOmipT78CuFWXPVllJxZmSlVUr9LPYVMBi9XJdDTqoYOnO-9ZeP3_uKj1wvNYIW4Y3d7cXkJpPZrMrcH34Mts0vrvsGOxHrls8jPTVqmWlLCaLAp3pd1pbgvOEJ_rtv7hUPK_k-kXI1-0jf-PMqLHp6PHb7KnT1ZTIUlk5f8EoG5tNiaLVgqPLstmM0aZ9e51lgnESN1meZLDV2m-Nq369edDuoJbGn2tFSlrXhBkX18JaSDZq49JaWDskGFTvunBBspo8_K3LY8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