r285573 - second attempt at r285565.

Michael Zuckerman via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 07:16:57 PDT 2016


Author: mzuckerm
Date: Mon Oct 31 09:16:57 2016
New Revision: 285573

URL: http://llvm.org/viewvc/llvm-project?rev=285573&view=rev
Log:
second attempt at r285565.

Added:
    cfe/trunk/test/CodeGen/avx512-inline-asm-kregisters-basics.c
Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=285573&r1=285572&r2=285573&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Oct 31 09:16:57 2016
@@ -2397,6 +2397,7 @@ static const char* const GCCRegNames[] =
   "zmm8", "zmm9", "zmm10", "zmm11", "zmm12", "zmm13", "zmm14", "zmm15",
   "zmm16", "zmm17", "zmm18", "zmm19", "zmm20", "zmm21", "zmm22", "zmm23",
   "zmm24", "zmm25", "zmm26", "zmm27", "zmm28", "zmm29", "zmm30", "zmm31",
+  "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7",
 };
 
 const TargetInfo::AddlRegName AddlRegNames[] = {

Added: cfe/trunk/test/CodeGen/avx512-inline-asm-kregisters-basics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512-inline-asm-kregisters-basics.c?rev=285573&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/avx512-inline-asm-kregisters-basics.c (added)
+++ cfe/trunk/test/CodeGen/avx512-inline-asm-kregisters-basics.c Mon Oct 31 09:16:57 2016
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s
+// This test checks basic inline assembly recognition of k0-k7 registers for avx512.
+
+void test_basic_inline_asm_with_k_regs() {
+    //CHECK: kandw %k1, %k2, %k3
+    asm("kandw %k1, %k2, %k3\t");
+    //CHECK: kandw %k4, %k5, %k6
+    asm("kandw %k4, %k5, %k6\t");
+    //CHECK: kandw %k7, %k0, %k1
+    asm("kandw %k7, %k0, %k1\t");
+}
\ No newline at end of file




More information about the cfe-commits mailing list