[llvm-bugs] [Bug 24288] Regression due to GMR changes in r242512

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 10 01:26:16 PDT 2015


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

Michael Kuperstein <michael.m.kuperstein at intel.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #6 from Michael Kuperstein <michael.m.kuperstein at intel.com> ---
Not hard enough. :-)
That still doesn't fix the original eembc issue, I over-reduced the reproducer.
This still fails:

@ptr = internal unnamed_addr global i8* getelementptr inbounds ([4096 x i8],
[4096 x i8]* @arr, i32 0, i32 0), align 4
@arr = internal global [4096 x i8] zeroinitializer, align 1

define i8* @foo(i32 %k, i32 %incr, i8* %p) {
entry:
  %start = icmp sgt i32 %k, 0
  br i1 %start, label %for.body, label %for.end

for.body:
  %i = phi i32 [ %next, %for.body ], [ 0, %entry ]
  %mul= mul nsw i32 %i, %incr
  %readptr = getelementptr inbounds i8, i8* %p, i32 %mul
  %val = load i8, i8* %readptr, align 1
  %writeptr = load i8*, i8** @ptr
  %newptr = getelementptr inbounds i8, i8* %writeptr
  store i8* %newptr, i8** @ptr, align 4
  store i8 %val, i8* %writeptr, align 1
  %cmpptr = load i8*, i8** @ptr
  %cmp = icmp eq i8* %cmpptr, getelementptr inbounds ([4096 x i8], [4096 x i8]*
@arr, i32 1, i32 0)
  store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @arr, i32 0, i32
0), i8** @ptr  
  %next = add i32 %i, 1
  br i1 %cmp, label %for.body, label %for.end

for.end:
  %ret = load i8*, i8** @ptr
  ret i8* %ret
}

The only difference is the store just before %next.

-- 
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/20150810/c42c7bf3/attachment.html>


More information about the llvm-bugs mailing list