[PATCH] D18290: Unroll of loops with constant bounds

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 18:48:31 PDT 2016

mzolotukhin added inline comments.

Comment at: test/Transforms/LoopUnroll/partial-unroll-const-bounds.ll:1
@@ +1,2 @@
+; RUN: opt < %s -S -unroll-threshold=20 -loop-unroll -unroll-allow-partial -O2 | FileCheck %s
evstupac wrote:
> mzolotukhin wrote:
> > You probably don't want to run `opt ... -O2` in this test. O2 will run the entire optimization pipeline, while we only want loop-unroll.
> "-O2" makes CHECK statements easier. However I agree it is not required here. I'll fix the test.
You could add some specific passes after yours. You probably need just something like `-dce -instcombine -simplifycfg` - some tests do this. Adding the entire "-O2" might introduce undesired side effects from e.g. running loop-unroll twice.



More information about the llvm-commits mailing list