[PATCH] D86485: [test] Fix FullUnroll.ll

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 09:46:35 PDT 2020


I don't think your statement matches what I was seeing. I may have
constructed the testcase poorly, but there were differences being shown.
Also keep in mind that your clang run is testing what I've already fixed. :)

Happy to work with you on a testcase here, but I don't have time this week.

On Mon, Aug 24, 2020 at 5:40 PM Arthur Eubanks via Phabricator <
reviews at reviews.llvm.org> wrote:

> aeubanks added a comment.
>
> In D86485#2234668 <https://reviews.llvm.org/D86485#2234668>, @echristo
> wrote:
>
> > The code has a pragma to turn on loop unrolling. I actually did want to
> check with optnone.
>
> But the pragmas don't have an effect for -O0 in both the legacy and new
> PMs. And the legacy PM skipped loop unrolling on all optnone functions:
> https://github.com/llvm/llvm-project/blob/c1d25e9a82554aa580b3cc0b97fc5c7db8164042/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp#L1231.
> So the NPM pass probably also should.
>
>   $ cat /tmp/a.c
>   void b();
>
>   void a() {
>   #pragma clang loop unroll(full)
>           for (int i = 0; i < 50; i++) {
>                   b();
>           }
>   }
>   $ ./build_debug/bin/clang -S -emit-llvm /tmp/a.c -O0 -o -
>   ... not unrolled LLVM IR
>   $ ./build_debug/bin/clang -S -emit-llvm /tmp/a.c -O0 -o -
> -fexperimental-new-pass-manager
>   ... not unrolled LLVM IR
>   $ ./build_debug/bin/clang -S -emit-llvm /tmp/a.c -O1 -o -
>   ... unrolled LLVM IR
>   $ ./build_debug/bin/clang -S -emit-llvm /tmp/a.c -O1 -o -
> -fexperimental-new-pass-manager
>   ... unrolled LLVM IR
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D86485/new/
>
> https://reviews.llvm.org/D86485
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200902/56feeec0/attachment.html>


More information about the llvm-commits mailing list