<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 - LoopLoadElim: assert failed "cast<Ty>() argument of incompatible type!""
   href="https://bugs.llvm.org/show_bug.cgi?id=47457">47457</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LoopLoadElim: assert failed "cast<Ty>() argument of incompatible type!"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>max.kazantsev@azul.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Command: opt -loop-load-elim -S ./test.ll

test.ll:

source_filename = "./test.ll"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

define void @pluto() {
bb:
  br label %bb1

bb1:                                              ; preds = %bb6, %bb1, %bb
  %tmp = phi i32 [ undef, %bb ], [ 0, %bb1 ], [ %tmp3, %bb6 ]
  br i1 undef, label %bb1, label %bb2

bb2:                                              ; preds = %bb1
  %tmp3 = add i32 %tmp, 1
  %tmp4 = icmp ult i32 %tmp, undef
  br i1 %tmp4, label %bb6, label %bb5

bb5:                                              ; preds = %bb2
  ret void

bb6:                                              ; preds = %bb2
  br i1 undef, label %bb7, label %bb1

bb7:                                              ; preds = %bb7, %bb6
  %tmp8 = phi i32 [ %tmp15, %bb7 ], [ %tmp3, %bb6 ]
  %tmp9 = phi i32 [ %tmp8, %bb7 ], [ %tmp, %bb6 ]
  %tmp10 = zext i32 %tmp9 to i64
  %tmp11 = getelementptr inbounds float, float addrspace(1)* null, i64 %tmp10
  %tmp12 = load float, float addrspace(1)* %tmp11, align 4
  %tmp13 = zext i32 %tmp8 to i64
  %tmp14 = getelementptr inbounds float, float addrspace(1)* null, i64 %tmp13
  store float 1.000000e+00, float addrspace(1)* %tmp14, align 4
  %tmp15 = add nuw nsw i32 %tmp8, 1
  %tmp16 = icmp sgt i32 %tmp8, 78
  br i1 %tmp16, label %bb17, label %bb7

bb17:                                             ; preds = %bb7
  unreachable
}

Failed attempt of unconditionlal cast of some SCEV to SCEVAddRec. Our
downstream test first showed this failure  starting from patch:

commit 99166fd4fb422351f131fb1265cb85d5f6c5b8da
Author: Florian Hahn <<a href="mailto:flo@fhahn.com">flo@fhahn.com</a>>
Date: Wed Jul 29 14:54:03 2020 +0100

[SCEVExpander] Add option to preserve LCSSA directly.

But I haven't yet confirmed that it's related to the root cause (it might have
just exposed an older bug).</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>