<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - AVX512 fails to select CMP of i1."
   href="https://llvm.org/bugs/show_bug.cgi?id=30249">30249</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AVX512 fails to select CMP of i1.
          </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>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>mkuper@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>define i64 @foo() {
  %v = select i1 undef, i64 1, i64 2
  ret i64 %v
}

bin/llc ~/llvm/temp/i1512.ll -mattr=+avx512f -mattr=+avx2

SelectionDAG has 11 nodes:
    t0: ch = EntryToken
      t18: i32 = X86ISD::CMP undef:i1, Constant:i1<-1>
    t20: i64 = X86ISD::ADC Constant:i64<1>, Constant:i64<0>, t18
  t7: ch,glue = CopyToReg t0, Register:i64 %RAX, t20
  t8: ch = X86ISD::RET_FLAG t7, TargetConstant:i32<0>, Register:i64 %RAX, t7:1

[...]

LLVM ERROR: Cannot select: 0x2ec28d0: i32 = X86ISD::CMP undef:i1,
Constant:i1<-1>
  0x2ec2240: i1 = undef
  0x2ec2710: i1 = Constant<-1>
In function: foo</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>