[PATCH] D64781: Silence backend complaints on x86 Android

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 17:26:54 PDT 2019


george.burgess.iv created this revision.
george.burgess.iv added a reviewer: compnerd.
Herald added a subscriber: srhines.

r364352 started passing a new `target-feature` for builds with an Android x86 target. On master, this results in 'warnings' from the backend:

$ echo 'int main() {}' | llvm/clean/build/release/bin/clang++ --target=x86_64-linux-android -c -x c++ - -o /dev/null
'+mcx16' is not a recognized feature for this target (ignoring feature)
'+mcx16' is not a recognized feature for this target (ignoring feature)
'+mcx16' is not a recognized feature for this target (ignoring feature)
$

>From context, my best guess is that this was just a little typo. Unsure if this is the right fix (and if it is the right fix, if we want more testing around this). Thoughts appreciated :)


https://reviews.llvm.org/D64781

Files:
  clang/lib/Driver/ToolChains/Arch/X86.cpp
  clang/test/Driver/clang-translation.c


Index: clang/test/Driver/clang-translation.c
===================================================================
--- clang/test/Driver/clang-translation.c
+++ clang/test/Driver/clang-translation.c
@@ -318,7 +318,7 @@
 // ANDROID-X86_64: "-target-cpu" "x86-64"
 // ANDROID-X86_64: "-target-feature" "+sse4.2"
 // ANDROID-X86_64: "-target-feature" "+popcnt"
-// ANDROID-X86_64: "-target-feature" "+mcx16"
+// ANDROID-X86_64: "-target-feature" "+cx16"
 
 // RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
 // RUN: FileCheck -check-prefix=MIPS %s
Index: clang/lib/Driver/ToolChains/Arch/X86.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Arch/X86.cpp
+++ clang/lib/Driver/ToolChains/Arch/X86.cpp
@@ -135,7 +135,7 @@
     if (ArchType == llvm::Triple::x86_64) {
       Features.push_back("+sse4.2");
       Features.push_back("+popcnt");
-      Features.push_back("+mcx16");
+      Features.push_back("+cx16");
     } else
       Features.push_back("+ssse3");
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64781.210000.patch
Type: text/x-patch
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/fd51906e/attachment.bin>


More information about the llvm-commits mailing list