<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Cannot handle this kind of promotion assertion in Mips backend when vector comprises illegal types"
   href="https://bugs.llvm.org/show_bug.cgi?id=49551">49551</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot handle this kind of promotion assertion in Mips backend when vector comprises illegal types
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: MIPS
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simonas+llvm.org@kazlauskas.me
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>; RUN: llc -mtriple=mips
define <4 x i1> @test_srem_vec(<4 x i31> %X) nounwind {
  %srem = srem <4 x i31> %X, <i31 9, i31 9, i31 -9, i31 -9>
  %cmp = icmp ne <4 x i31> %srem, <i31 4, i31 -4, i31 4, i31 -4>
  ret <4 x i1> %cmp
}

Will result in the following output when LLVM with enabled assertions is used:

llc: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:420: llvm::SDValue
getCopyFromPartsVector(llvm::SelectionDAG&, const llvm::SDLoc&, const
llvm::SDValue*, unsigned int, llvm::MVT, llvm::EVT, const llvm::Value*,
llvm::Optional<unsigned int>): Assertion `PartEVT.getVectorElementCount() ==
ValueVT.getVectorElementCount() && "Cannot handle this kind of promotion"'
failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: ./build/bin/llc -mtriple=mips /tmp/sremtest.ll
1.      Running pass 'Function Pass Manager' on module '/tmp/sremtest.ll'.
2.      Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function
'@test_srem_vec'
 #0 0x0000000002cd023d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(./build/bin/llc+0x2cd023d)
 #1 0x0000000002ccde44 llvm::sys::RunSignalHandlers()
(./build/bin/llc+0x2ccde44)
 #2 0x0000000002ccdfbb SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f1b450db700 __restore_rt
(/nix/store/3wa1xwnfv8ada1za1r8m4vmsiz1jifqq-glibc-2.32-35/lib/libpthread.so.0+0x13700)
 #4 0x00007f1b44be233a raise
(/nix/store/3wa1xwnfv8ada1za1r8m4vmsiz1jifqq-glibc-2.32-35/lib/libc.so.6+0x3c33a)
 #5 0x00007f1b44bcc523 abort
(/nix/store/3wa1xwnfv8ada1za1r8m4vmsiz1jifqq-glibc-2.32-35/lib/libc.so.6+0x26523)
 #6 0x00007f1b44bcc41f _nl_load_domain.cold.0
(/nix/store/3wa1xwnfv8ada1za1r8m4vmsiz1jifqq-glibc-2.32-35/lib/libc.so.6+0x2641f)
 #7 0x00007f1b44bdad92
(/nix/store/3wa1xwnfv8ada1za1r8m4vmsiz1jifqq-glibc-2.32-35/lib/libc.so.6+0x34d92)
 #8 0x0000000002a27aaa getCopyFromParts(llvm::SelectionDAG&, llvm::SDLoc
const&, llvm::SDValue const*, unsigned int, llvm::MVT, llvm::EVT, llvm::Value
const*, llvm::Optional<unsigned int>, llvm::Optional<llvm::ISD::NodeType>)
(.isra.0) SelectionDAGBuilder.cpp:0:0
 #9 0x0000000002a71552 llvm::SelectionDAGISel::LowerArguments(llvm::Function
const&) (./build/bin/llc+0x2a71552)
#10 0x0000000002ae2965
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(./build/bin/llc+0x2ae2965)
#11 0x0000000002ae3d54
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0)
SelectionDAGISel.cpp:0:0
#12 0x000000000121d78b
llvm::MipsDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(./build/bin/llc+0x121d78b)
#13 0x000000000200124c
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(./build/bin/llc+0x200124c)
#14 0x0000000002497b6d llvm::FPPassManager::runOnFunction(llvm::Function&)
(./build/bin/llc+0x2497b6d)
#15 0x00000000024986a1 llvm::FPPassManager::runOnModule(llvm::Module&)
(./build/bin/llc+0x24986a1)
#16 0x00000000024974c3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(./build/bin/llc+0x24974c3)
#17 0x000000000067b7a7 main (./build/bin/llc+0x67b7a7)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>