summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-25 05:04:35 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-25 05:04:35 +0000
commitdfa39ffd088e0a66bb88239556b029ebb8fc57fc (patch)
tree212677775d2faa72ccfa823670b615978c1e6d26 /lib/CodeGen/CodeGenFunction.cpp
parentdc94ce7a8dc76e065255b325fa1e345c32f0b85a (diff)
downloadclang-dfa39ffd088e0a66bb88239556b029ebb8fc57fc.tar.gz
[CodeGen] Always emit the 'min-legal-vector-width' attribute even when the value is 0.
The X86 backend will need to see the attribute to make decisions. If it isn't present the backend will have to assume large vectors may be present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 41bde79aba..700723189e 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -448,9 +448,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
// 4. Width of vector arguments and return types for this function.
// 5. Width of vector aguments and return types for functions called by this
// function.
- if (LargestVectorWidth != 0)
- CurFn->addFnAttr("min-legal-vector-width",
- llvm::utostr(LargestVectorWidth));
+ CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth));
}
/// ShouldInstrumentFunction - Return true if the current function should be