[LoopUnroll] Always respect user unroll pragma
authorWhitney Tsang <whitneyt@ca.ibm.com>
Mon, 11 Apr 2022 17:52:34 +0000 (13:52 -0400)
committerWhitney Tsang <whitneyt@ca.ibm.com>
Mon, 11 Apr 2022 18:33:24 +0000 (14:33 -0400)
commit80304c5f88f02cb189f6777313fdea146fcc595a
tree3e0784adbd4a836b2bb9a34d830e13791929c0e0
parent236b6a0eb41a163510e65664e2160f599287326b
[LoopUnroll] Always respect user unroll pragma

IMO when user provide unroll pragma, compiler should always respect it.
It is not clear to me why loop unroll pass currently ensure that the
unrolled loop size is limited by PragmaUnrollThreshold.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D119148
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
llvm/test/Transforms/LoopUnroll/unroll-pragmas.ll