<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60168>60168</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Assertion `UndefMask.isAllOnes() && "Fully undef mask expected"' 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>
    Godbolt repro: https://godbolt.org/z/naPqWjv6W

Run clang++ -O3 on the following test:
[Test.cpp.zip](https://github.com/llvm/llvm-project/files/10466928/Test.cpp.zip)

Stack dump:
 #0 0x000056396378e04f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x40bc04f)
 #1 0x000056396378bfec llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x40b9fec)
 #2 0x00005639636d9368 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f78f3036420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f78f2b0300b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f78f2ae2859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007f78f2ae2729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007f78f2af3fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x000056396238c3f9 llvm::X86TargetLowering::LowerBUILD_VECTOR(llvm::SDValue, llvm::SelectionDAG&) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x2cba3f9)
 #9 0x00005639623c20a0 llvm::X86TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x2cf00a0)
#10 0x00005639648b4ea3 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) (.part.0) LegalizeDAG.cpp:0:0
#11 0x00005639648c43ac llvm::SelectionDAG::Legalize() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x51f23ac)
#12 0x00005639649a289d llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x52d089d)
#13 0x00005639649a62d8 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x52d42d8)
#14 0x00005639649a825d llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#15 0x0000563962242620 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#16 0x0000563962a0a4ce llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#17 0x0000563962fb3655 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x38e1655)
#18 0x0000563962fb3899 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x38e1899)
#19 0x0000563962fb40e2 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x38e20e2)
#20 0x0000563963b8cec0 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) BackendUtil.cpp:0:0
#21 0x0000563963b8d525 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44bb525)
#22 0x0000563964b0b8bb clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x54398bb)
#23 0x0000563965e04b05 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6732b05)
#24 0x0000563964b0a338 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5438338)
#25 0x000056396437b3a9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4ca93a9)
#26 0x00005639643012ae clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4c2f2ae)
#27 0x0000563964461053 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4d8f053)
#28 0x0000563960c27e7d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x1555e7d)
#29 0x0000563960c23f97 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#30 0x0000563964168f19 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#31 0x00005639636d9850 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4007850)
#32 0x00005639641697cf clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#33 0x0000563964131fac clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4a5ffac)
#34 0x0000563964132a2d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4a60a2d)
#35 0x000056396413bbfc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4a69bfc)
#36 0x0000563960c265e2 clang_main(int, char**) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x15545e2)
#37 0x00007f78f2ae4083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#38 0x0000563960c1ec7e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x154cc7e)
clang-16: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWV1v2zjT_TXKDRGDIvV5kQvFrrtdtG-KJt3dO4OiRo42NKklqXz017-gJMei4mxSICkWeIA2tkVyeObwcGZIMWOarQQ4C-LzIF6dsM5eK312xewDk2ylutKak1JVD2cfVVUqYZGGVquAFuja2tYEtAjIOiDr7dC8UHobkPWPgKwl-_rPn3_fJn8GeBXgYvj7rZOICya3ATkPyDk6vaBISWSvAdVKCHXXyC2yYKwzPIyLz6_A2AVv28WPpg3iVUCy2dyNve7KBVe7gKyFuN1_nLZa_Q3cBmRdNwJMQNYhjpIkJ1lA1p5Vkk9RXlrGb1DV7dpHGCggFCN8jzHGcULzhKYZ4KhG_Xy0CGhhHszw5atupO1tXGnGISDZoZNmdxtlrAa2C0gSkCVqpA1IjoIelGodWq52bSNAn8J9K5QG7Z451k6Z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