R600/SI: Fix bug in TTI loop unrolling preferences
authorTom Stellard <thomas.stellard@amd.com>
Thu, 5 Feb 2015 15:32:18 +0000 (15:32 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 5 Feb 2015 15:32:18 +0000 (15:32 +0000)
commitc7198528ebf3c26e0685bc7ba34c9f74f8b2befa
tree230cc4c1900fd93ccffed337a7fdb3ab32a07272
parent041211cd79aa141dce356aad0be7a0acb44ed55b
R600/SI: Fix bug in TTI loop unrolling preferences

We should be setting UnrollingPreferences::MaxCount to MAX_UINT instead
of UnrollingPreferences::Count.

Count is a 'forced unrolling factor', while MaxCount sets an upper
limit to the unrolling factor.

Setting Count to MAX_UINT was causing the loop in the testcase to be
unrolled 15 times, when it only had a maximum of 4 iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228303 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
test/CodeGen/R600/tti-unroll-prefs.ll [new file with mode: 0644]