[llvm-bugs] [Bug 43480] New: [LSR] Assert in InsertFormula

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 27 05:26:15 PDT 2019


            Bug ID: 43480
           Summary: [LSR] Assert in InsertFormula
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: sjoerd.meijer at arm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22590
  --> https://bugs.llvm.org/attachment.cgi?id=22590&action=edit

LSR is running in this assert:

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3372: bool
{anonymous}::LSRInstance::InsertFormula({anonymous}::LSRUse&, unsigned int,
const {anonymous}::Formula&): Assertion `isLegalUse(TTI, LU.MinOffset,
LU.MaxOffset, LU.Kind, LU.AccessTy, F) && "Formula is illegal"' failed.
Stack dump:
0.      Program arguments: /data/monorepo/llvm-project/build/bin/llc sjoerd.ll 
1.      Running pass 'Function Pass Manager' on module 'sjoerd.ll'.
2.      Running pass 'Loop Pass Manager' on function '@fn1'
3.      Running pass 'Loop Strength Reduction' on basic block '%for.cond'

Running llc on the attached .ll file is enough to reproduce this.

Just for completeness, this .ll file corresponds to this creduced input file:

__fp16 *a;
void fn1() {
  for (int i; ; i++)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190927/048c4641/attachment-0001.html>

More information about the llvm-bugs mailing list