<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 - Assertion `!isHReg(DestReg) && "Cannot move between mask and h-reg"' failed with -m32 -O0 -march=skx."
   href="https://bugs.llvm.org/show_bug.cgi?id=32256">32256</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `!isHReg(DestReg) && "Cannot move between mask and h-reg"' failed with -m32 -O0 -march=skx.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Vsevolod.Livinskij@frtk.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18089" name="attach_18089" title="Reproducer.">attachment 18089</a> <a href="attachment.cgi?id=18089&action=edit" title="Reproducer.">[details]</a></span>
Reproducer.

-m32 -O0 -march=skx options resulted in assertion fail: `!isHReg(DestReg) &&
"Cannot move between mask and h-reg"' (same problem with knl). Everything works
fine with other optimizations levels. 

Reproducer:
extern bool c;
void a() { 
    char b = bool(!c) && 0; 
}

LLVM version:
clang version 5.0.0 (trunk 297578)

Error:
clang-5.0:
/home/vsevolod/workspace/llvm/llvm-trunk/lib/Target/X86/X86InstrInfo.cpp:6328:
unsigned int CopyToFromAsymmetricReg(unsigned int&, unsigned int&, const
llvm::X86Subtarget&): Assertion `!isHReg(DestReg) && "Cannot move between mask
and h-reg"' failed.
(........)</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>