https://bugs.llvm.org/show_bug.cgi?id=43480

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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

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++)
    foo(a[i]);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to