[llvm-bugs] [Bug 40564] New: [Debuginfo] @llvm.dbg.value in loop prevents optimization in LoopIdiomRecognize

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 1 10:14:01 PST 2019


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

            Bug ID: 40564
           Summary: [Debuginfo]  @llvm.dbg.value in loop prevents
                    optimization in LoopIdiomRecognize
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

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

In LoopIdiomRecognize.cpp at line 1464 there is a check

if (CurLoop->getHeader()->size() != IdiomCanonicalSize ...

It seems that a llvm.dbg.value affects the header size value, and so prevents
this optimization. If they are removed from the loop (bb8) in the test case,
the loop is later removed.

bin/opt -mtriple=systemz-unknown -mcpu=z13 -S tc_loopidioms_delete.ll -o -
-loop-idiom -loop-deletion

-- 
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/20190201/a2a747d2/attachment-0001.html>


More information about the llvm-bugs mailing list