summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-02-05 15:32:18 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-02-05 15:32:18 +0000
commiteea3f70432da197148955efee66885cb186135fe (patch)
tree8323bf0c1561c1151bf0b63ce4bdd0c4e8e1ccb6 /llvm/lib
parent0f29de78e6713959126ed2f90741cabbea64a798 (diff)
downloadbcm5719-llvm-eea3f70432da197148955efee66885cb186135fe.tar.gz
bcm5719-llvm-eea3f70432da197148955efee66885cb186135fe.zip
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. llvm-svn: 228303
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
index 4647ddf038e..68f4600f1d3 100644
--- a/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
@@ -30,7 +30,7 @@ using namespace llvm;
void AMDGPUTTIImpl::getUnrollingPreferences(Loop *L,
TTI::UnrollingPreferences &UP) {
UP.Threshold = 300; // Twice the default.
- UP.Count = UINT_MAX;
+ UP.MaxCount = UINT_MAX;
UP.Partial = true;
// TODO: Do we want runtime unrolling?
OpenPOWER on IntegriCloud