<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 - Error "Do not know how to split this operator's operand!" after "Add ARMv8.2-A FP16 vector intrinsic""
   href="https://bugs.llvm.org/show_bug.cgi?id=36683">36683</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Error "Do not know how to split this operator's operand!" after "Add ARMv8.2-A FP16 vector intrinsic"
          </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>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>martin@martin.st
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20046" name="attach_20046" title="Reduced source code that triggers the error">attachment 20046</a> <a href="attachment.cgi?id=20046&action=edit" title="Reduced source code that triggers the error">[details]</a></span>
Reduced source code that triggers the error

Commit SVN r327189 in clang ([ARM] Add ARMv8.2-A FP16 vector intrinsic) caused
the following test C code to change the output IR:

    typedef __attribute__((neon_vector_type(4))) __fp16 float16x4_t;
    void fn1() {
      __fp16 *out_f16;
      float16x4_t __s1;
      __builtin_neon_vst1_v(out_f16, __s1, 8);
    }

When built e.g. like this, "clang -target armv7-linux-gnueabihf -c
qfloat16-reduced.c -O2", it errors out with the following message:

<span class="quote">> SplitVectorOperand Op #3: t5: ch = llvm.arm.neon.vst1<ST8[undef](align=2)> t0, TargetConstant:i32<716>, undef:i32, undef:v4f16, Constant:i32<2>
>   
> fatal error: error in backend: Do not know how to split this operator's operand!

> clang-7.0: error: clang frontend command failed with exit code 70 (use -v to see invocation)
> clang version 7.0.0 (<a href="http://llvm.org/git/clang">http://llvm.org/git/clang</a> 72858dcc190c6438930f3cc17a134ed6195f6a15) (llvm/trunk 327197)"</span >

The generated LLVM IR after the change, that fails also when run through llc,
is the following:

    define void @fn1() {
    entry:
      tail call void @llvm.arm.neon.vst1.p0i8.v4f16(i8* undef, <4 x half>
undef, i32 2)
      ret void
    }

    declare void @llvm.arm.neon.vst1.p0i8.v4f16(i8*, <4 x half>, i32)</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>