commit | 1be9b9f81694617edd85e28f03cab07b3864f7e1 | [log] [tgz] |
---|---|---|
author | Changpeng Fang <changpeng.fang@gmail.com> | Thu Mar 09 00:07:00 2017 +0000 |
committer | Changpeng Fang <changpeng.fang@gmail.com> | Thu Mar 09 00:07:00 2017 +0000 |
tree | 7c3a14b6cc00daac79830b98d94f1f0c27d65fe4 | |
parent | 8537d9994dbd041da176059449d060f2f320fc1a [diff] [blame] |
AMDGPU/SI: Disable unrolling in the loop vectorizer if the loop is not vectorized. Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D30719 llvm-svn: 297328
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp index a780a76..4a6d12b 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -155,6 +155,10 @@ } unsigned AMDGPUTTIImpl::getMaxInterleaveFactor(unsigned VF) { + // Disable unrolling if the loop is not vectorized. + if (VF == 1) + return 1; + // Semi-arbitrary large amount. return 64; }