<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 - Check for incompatible target features"
   href="https://bugs.llvm.org/show_bug.cgi?id=52156">52156</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Check for incompatible target features
          </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>Target Description Classes
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>lhames@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In <a href="https://llvm.org/PR52031">https://llvm.org/PR52031</a> it was found that the module below passes the
verifier, despite the two functions main and new_function having incompatible
target-features.

If possible, we should have the verifier query the target to detect
incompatible features like this so that they can be quickly reported to users.

module.ll:

define i32 @main() #0 {
  br label %1
1:                                                ; preds = %1, %0
  %2 = phi i64 [ 0, %0 ], [ %6, %1 ]
  %3 = phi <4 x i64> [ <i64 -16, i64 -16, i64 -16, i64 -16>, %0 ], [ %5, %1 ]
  %4 = trunc <4 x i64> %3 to <4 x i32>
  %5 = call <4 x i64> @new_function(<4 x i64> %3)
  %6 = add i64 %2, 1
  %7 = icmp eq i64 %6, 2
  br i1 %7, label %8, label %1
8:                                                ; preds = %1
  %9 = extractelement <4 x i32> %4, i32 3
  ret i32 %9
}
define <4 x i64> @new_function(<4 x i64> %0) unnamed_addr {
  %2 = add <4 x i64> %0, <i64 16, i64 16, i64 16, i64 16>
  ret <4 x i64> %2
}
attributes #0 = { "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" }</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>