<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 - [X86] Cannot select v4f64 = vector_shuffle"
   href="https://bugs.llvm.org/show_bug.cgi?id=43866">43866</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Cannot select v4f64 = vector_shuffle
          </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>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>Wolfgang_Pieb@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The attached IR causes an ICE when compiled with the latest llc for an X86
target:

$ llc test.ll
LLVM ERROR: Cannot select: t53: v4f64 = vector_shuffle<0,1,0,1> t51,
undef:v4f64
  t51: v4f64 = bitcast t72
    t72: v8i32 = BUILD_VECTOR undef:i32, Constant:i32<-1>, undef:i32,
undef:i32, undef:i32, undef:i32, undef:i32, undef:i32
      t9: i32 = undef
      t5: i32 = Constant<-1>
      t9: i32 = undef
      t9: i32 = undef
      t9: i32 = undef
      t9: i32 = undef
      t9: i32 = undef
      t9: i32 = undef
  t52: v4f64 = undef
In function: test

It seems it's caused by
==============================================
commit 30837abd9623bf2c8582627d2179828ecf361965
Author: Craig Topper <<a href="mailto:craig.topper@intel.com">craig.topper@intel.com</a>>
Date:   Sun Sep 8 19:24:29 2019 +0000

    [X86] Teach materializeVectorConstant to not call
getZeroVector/getOnesVector on the types we already have isel patterns for.

    llvm-svn: 371343
==============================================
The .ll file was generated (and then hand-reduced) with

clang version 10.0.0 (<a href="mailto:git@github.com">git@github.com</a>:llvm/llvm-project.git 30837abd9623b...)
from the following C source:

typedef unsigned __attribute__((ext_vector_type(2))) uint2;
typedef unsigned __attribute__((ext_vector_type(8))) uint8;

uint2 v2_0;
void test()
{
      uint2 v2_1 = {1, 1};
      uint2 v2_2 = (uint2)(v2_0 || v2_1);
      volatile uint8 v8_0 = __builtin_shufflevector(v2_0, v2_2, 1, 3, 0, 0, 3,
3, 2, 2);
}</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>