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
// 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
// CHECK: attributes #0 ={{.*}}"min-legal-vector-width"="128"
// CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="64"
-// CHECK-NOT: attributes #2 ={{.*}}"min-legal-vector-width"
+// CHECK: attributes #2 ={{.*}}"min-legal-vector-width"="0"
// CHECK: attributes #0 ={{.*}}"min-legal-vector-width"="64"
// CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="128"
-// CHECK-NOT: attributes #2 ={{.*}}"min-legal-vector-width"
+// CHECK: attributes #2 ={{.*}}"min-legal-vector-width"="0"