diff options
author | Craig Topper <craig.topper@intel.com> | 2018-10-25 05:04:35 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-10-25 05:04:35 +0000 |
commit | 00897e9b7b88f0435565909480021803c21ca3b7 (patch) | |
tree | 4b5d607b130d045b1aa07494f4323a7032930b31 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | eaa1cf5b574438210eb7f41285c4004ec194749e (diff) | |
download | bcm5719-llvm-00897e9b7b88f0435565909480021803c21ca3b7.tar.gz bcm5719-llvm-00897e9b7b88f0435565909480021803c21ca3b7.zip |
[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.
llvm-svn: 345237
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 41bde79abab..700723189ed 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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 |