<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 --- - Unable to lower ISD::INSERT_VECTOR on Power9"
   href="https://llvm.org/bugs/show_bug.cgi?id=30189">30189</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unable to lower ISD::INSERT_VECTOR on Power9
          </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: PowerPC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nemanja.i.ibm@gmail.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>When I implemented the XXINSERTW instruction, I forgot to account for the
possibility that the index for the insertion may be variable. Currently, we
crash on the following input:

$ cat t.c 
vector float test(vector float v, float f, int el) {
  v[el] = f;
  return v;
}

$ clang -O2 -mcpu=pwr9 t.c -faltivec -S
fatal error: error in backend: Cannot select: t11: v4f32 = insert_vector_elt
t2, t4, t8
  t2: v4f32,ch = CopyFromReg t0, Register:v4f32 %vreg0
    t1: v4f32 = Register %vreg0
  t4: f32,ch = CopyFromReg t0, Register:f32 %vreg1
    t3: f32 = Register %vreg1
  t8: i64 = AssertSext t6, ValueType:ch:i32
    t6: i64,ch = CopyFromReg t0, Register:i64 %vreg2
      t5: i64 = Register %vreg2
In function: test
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 4.0.0 (trunk 278682) (llvm/trunk 278681)
Target: powerpc64le-unknown-linux-gnu

A patch that fixes this will follow in a comment.</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>