[PATCH] D37153: [LoopUnroll] Properly update loop structure in case of successful peeling

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 13:00:59 PDT 2017


davide added a comment.

The issue was indeed that peeling was forced only on systemz.
I added a `cl::opt` and I was able to reproduce the bug on my machine (x86-64 Linux), and I was able to reduce the testcase to something much smaller:

  declare zeroext i8 @patatino()
  
  define fastcc void @tinky() {
  entry:
    br label %for.cond93
  
  for.cond93.loopexit:
    ret void
  
  for.cond93:
    br label %for.body198
  
  for.body198:
    %l_249.12 = phi i8 [ undef, %for.cond93 ], [ %call593, %for.body198 ]
    %l_522.01 = phi i32 [ 0, %for.cond93 ], [ 1, %for.body198 ]
    %call593 = tail call zeroext i8 @patatino()
    br i1 false, label %for.body198, label %for.cond93.loopexit
  }

Maybe we can squeeze out another instruction or tow, but that doesn't seem to be worth our time.


https://reviews.llvm.org/D37153





More information about the llvm-commits mailing list