From 00897e9b7b88f0435565909480021803c21ca3b7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 25 Oct 2018 05:04:35 +0000 Subject: [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 --- clang/lib/CodeGen/CodeGenFunction.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') 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 -- cgit v1.2.3