[PATCH] D88471: [Passes] Run peeling as part of simple/full loop unrolling.

Sanne Wouda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 08:53:00 PST 2021


sanwou01 added a comment.

Hey, we've run into a case where this patch causes a dead loop to appear which doesn't subsequently get removed. It's not a huge deal (we're seeing some great speed-ups from this patch too!), but a niggle that might be nice to address. Reproducer: F15323772: unroll-into-dead-loop.ll <https://reviews.llvm.org/F15323772>

`opt -O3 -mtriple=aarch64 ~/tmp/unroll-into-dead-loop.ll -S -o -` results in this silly little loop:

  vector.body:                                      ; preds = %vector.body, %vector.ph
    %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
    %index.next = add i64 %index, 2
    %0 = icmp eq i64 %index.next, %n.vec
    br i1 %0, label %middle.block, label %vector.body, !llvm.loop !1


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88471/new/

https://reviews.llvm.org/D88471



More information about the llvm-commits mailing list