<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 - Verifier failure with ARMParallelDSP"
   href="https://bugs.llvm.org/show_bug.cgi?id=42729">42729</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Verifier failure with ARMParallelDSP
          </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>Windows NT
          </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>efriedma@quicinc.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org, sam.parker@arm.com, sjoerd.meijer@arm.com, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reproduce with "opt -arm-parallel-dsp reduced.ll -S"; produces:

Instruction does not dominate all uses!
  %uglygep1213 = bitcast i8* %uglygep12 to i16*
  %scevgep14 = getelementptr i16, i16* %uglygep1213, i32 6
in function f
LLVM ERROR: Broken function found, compilation aborted!

This is causing failures on the polly-aosp bot
(<a href="http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable">http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable</a>).

Testcase follows:

target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv7-unknown-linux-android"

define void @f(i16* %a) {
entry:
  %incdec.ptr21 = getelementptr inbounds i16, i16* %a, i32 3
  %incdec.ptr29 = getelementptr inbounds i16, i16* %a, i32 4
  br label %for.body

for.body:
  %0 = load i16, i16* %incdec.ptr21, align 2
  %conv25 = sext i16 %0 to i32
  %uglygep15 = getelementptr i8, i8* undef, i32 undef
  %uglygep1516 = bitcast i8* %uglygep15 to i16*
  %scevgep17 = getelementptr i16, i16* %uglygep1516, i32 7
  %1 = load i16, i16* %scevgep17, align 2
  %conv31 = sext i16 %1 to i32
  %2 = load i16, i16* %incdec.ptr29, align 2
  %conv33 = sext i16 %2 to i32
  %uglygep12 = getelementptr i8, i8* undef, i32 undef
  %uglygep1213 = bitcast i8* %uglygep12 to i16*
  %scevgep14 = getelementptr i16, i16* %uglygep1213, i32 6
  %3 = load i16, i16* %scevgep14, align 2
  %conv39 = sext i16 %3 to i32
  %mul.i287.neg.neg = mul nsw i32 %conv31, %conv25
  %mul.i283.neg.neg = mul nsw i32 %conv39, %conv33
  %reass.add408 = add i32 undef, %mul.i287.neg.neg
  %reass.add409 = add i32 %reass.add408, %mul.i283.neg.neg
  br label %for.body
}</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>