[llvm-bugs] [Bug 42436] New: [SCEV][LSR] Broken IR after LSR pass when compiling for armv8

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 28 05:52:41 PDT 2019


            Bug ID: 42436
           Summary: [SCEV][LSR] Broken IR after LSR pass when compiling
                    for armv8
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: eleviant at accesssoftek.com
                CC: llvm-bugs at lists.llvm.org

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

Compilation of large project for ARMv8 ended up with broken assembly code in 

vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator
__first, _ForwardIterator __last)

I investigated the problem and it seems to be in loop-reduce pass which creates
'sub' binary operation with these operands:

%8 = ptrtoint i8* %7 to i32
%10 = ptrtoint i8* undef to i32
%120 = sub i32 %10, %8

which should result to zero, but is in fact undefined.

One can reproduce it using the attached IR file and running:
opt -S -loop-reduce insert.ll

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/20190628/70705e72/attachment.html>

More information about the llvm-bugs mailing list