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

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

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

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
...
.preheader:
%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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to