<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 - fatal error: error in backend: Cannot select: t13: v4f32 = fdiv nsz arcp afn reassoc t41, t48"
   href="https://bugs.llvm.org/show_bug.cgi?id=47373">47373</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fatal error: error in backend: Cannot select: t13: v4f32 = fdiv nsz arcp afn reassoc t41, t48
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>pkubaj@anongoth.pl
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>FreeBSD head, LLVM 11.0.0 rc2, powerpc64 elfv2

Command:
/usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj
-menable-unsafe-fp-math -target-cpu ppc64 -O1 -vectorize-loops normvol-5b9b03.c

Reduced test case:
float *a, *b();
int c();
void d() {
  float *e, *h = a;
  int f, g = c();
  e = b();
  f = 0;
  for (; f < g; f++)
    h[f] /= e[f];
}

Result:
fatal error: error in backend: Cannot select: t13: v4f32 = fdiv nsz arcp afn
reassoc t41, t48
  t41: v4f32 = bitcast t40
    t40: v4i32 = llvm.ppc.altivec.vperm Constant:i32<6205>, t34, t37, t32
      t39: i32 = Constant<6205>
      t34: v4i32,ch = llvm.ppc.altivec.lvx<(load 31 from %ir.uglygep2728 - 15,
align 4)> t0, TargetConstant:i64<6058>, t11
        t33: i64 = TargetConstant<6058>
        t11: i64 = add t4, t6
          t4: i64,ch = CopyFromReg t0, Register:i64 %0
            t3: i64 = Register %0
          t6: i64,ch = CopyFromReg t0, Register:i64 %5
            t5: i64 = Register %5
      t37: v4i32,ch = llvm.ppc.altivec.lvx<(load 31 from %ir.uglygep2728 + 1,
align 4)> t0, TargetConstant:i64<6058>, t36
        t33: i64 = TargetConstant<6058>
        t36: i64 = add t11, Constant:i64<15>
          t11: i64 = add t4, t6
            t4: i64,ch = CopyFromReg t0, Register:i64 %0
              t3: i64 = Register %0
            t6: i64,ch = CopyFromReg t0, Register:i64 %5
              t5: i64 = Register %5
          t35: i64 = Constant<15>
      t32: v16i8 = llvm.ppc.altivec.lvsl Constant:i32<6056>, t11
        t31: i32 = Constant<6056>
        t11: i64 = add t4, t6
          t4: i64,ch = CopyFromReg t0, Register:i64 %0
            t3: i64 = Register %0
          t6: i64,ch = CopyFromReg t0, Register:i64 %5
            t5: i64 = Register %5
  t48: v4f32 = bitcast t47
    t47: v4i32 = llvm.ppc.altivec.vperm Constant:i32<6205>, t43, t45, t42
      t39: i32 = Constant<6205>
      t43: v4i32,ch = llvm.ppc.altivec.lvx<(load 31 from %ir.uglygep2526 - 15,
align 4)> t0, TargetConstant:i64<6058>, t7
        t33: i64 = TargetConstant<6058>
        t7: i64 = add t2, t6
          t2: i64,ch = CopyFromReg t0, Register:i64 %2
            t1: i64 = Register %2
          t6: i64,ch = CopyFromReg t0, Register:i64 %5
            t5: i64 = Register %5
      t45: v4i32,ch = llvm.ppc.altivec.lvx<(load 31 from %ir.uglygep2526 + 1,
align 4)> t0, TargetConstant:i64<6058>, t44
        t33: i64 = TargetConstant<6058>
        t44: i64 = add t7, Constant:i64<15>
          t7: i64 = add t2, t6
            t2: i64,ch = CopyFromReg t0, Register:i64 %2
              t1: i64 = Register %2
            t6: i64,ch = CopyFromReg t0, Register:i64 %5
              t5: i64 = Register %5
          t35: i64 = Constant<15>
      t42: v16i8 = llvm.ppc.altivec.lvsl Constant:i32<6056>, t7
        t31: i32 = Constant<6056>
        t7: i64 = add t2, t6
          t2: i64,ch = CopyFromReg t0, Register:i64 %2
            t1: i64 = Register %2
          t6: i64,ch = CopyFromReg t0, Register:i64 %5
            t5: i64 = Register %5
In function: d

It happens during compilation of VLC 3.0.11.</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>