================
@@ -2636,6 +2636,10 @@ void 
ModuleImport::processFunctionAttributes(llvm::Function *func,
     funcOp.setTargetFeaturesAttr(
         LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString()));
 
+  if (llvm::Attribute attr = func->getFnAttribute("prefer-vector-width");
+      attr.isStringAttribute())
+    funcOp.setPreferVectorWidth(attr.getValueAsString());
----------------
jeanPerier wrote:

Can you add an import test in mlir/test/Target/LLVMIR/Import and an export one 
in ‎mlir/test/Target/LLVMIR (just like the ones for tune-cpu)?

Even though the export is tested indirectly in flang, it is best to add an 
explicit test here.

https://github.com/llvm/llvm-project/pull/141380
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to