[PATCH] D136874: [clang][LTO] Passing vec-extabi to the Backend on AIX

Qiongsi Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 12:05:09 PDT 2022


qiongsiwu1 created this revision.
qiongsiwu1 added reviewers: w2yehia, MaskRay.
qiongsiwu1 added a project: clang.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, inglorion.
Herald added a project: All.
qiongsiwu1 requested review of this revision.
Herald added a subscriber: cfe-commits.

This patch passes on the `vec-extabi` mabi option on AIX.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136874

Files:
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/test/Driver/lto-aix.c


Index: clang/test/Driver/lto-aix.c
===================================================================
--- clang/test/Driver/lto-aix.c
+++ clang/test/Driver/lto-aix.c
@@ -27,6 +27,16 @@
 // O2: "-bplugin_opt:-O2"
 // O3: "-bplugin_opt:-O3"
 //
+// vec-extabi option
+// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \
+// RUN:   -fuse-ld=ld -flto -mabi=vec-extabi -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=VECEXTABI %s
+// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \
+// RUN:   -fuse-ld=ld -flto -### 2>&1 | FileCheck --check-prefix=NOVECEXTABI %s
+//
+// VECEXTABI: "-bplugin_opt:-vec-extabi"
+// NOVECEXTABI-NOT: "-bplugin_opt:-vec-extabi"
+//
 // Test debugging options
 // RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -gdbx 2>&1 \
 // RUN:   | FileCheck -check-prefix=DBX %s
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -599,6 +599,10 @@
                                         options::OPT_gno_strict_dwarf, true))
       CmdArgs.push_back(
           Args.MakeArgString(Twine(PluginOptPrefix) + "-strict-dwarf=true"));
+
+    if (Args.getLastArg(options::OPT_mabi_EQ_vec_extabi))
+      CmdArgs.push_back(
+          Args.MakeArgString(Twine(PluginOptPrefix) + "-vec-extabi"));
   }
 
   bool UseSeparateSections =


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136874.471251.patch
Type: text/x-patch
Size: 1476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221027/8cbc331e/attachment.bin>


More information about the cfe-commits mailing list