r341475 - Fix arm_neon.h and arm_fp16.h generation for compiling with std=c89

Diogo Sampaio via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 6 03:46:10 PDT 2018


Sorry, but my patch is not reverted, and as for now it only reads:

Failing Tests (2):
    LLVM :: CodeGen/AMDGPU/mubuf-legalize-operands.ll
    LLVM :: CodeGen/AMDGPU/mubuf-legalize-operands.mir


So I'm considering it was a side-effect of some other test.

On 09/05/2018 10:00 PM, Galina Kistanova wrote:
Hello Diogo,

This commit added couple of broken tests to one of our builders:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win

. . .
Failing Tests (5):
    Clang :: Headers/arm-fp16-header.c
    Clang :: Headers/arm-neon-header.c
. . .

Please have a look?
The builder was already red and did not send notifications on this.

Thanks

Galina

On Wed, Sep 5, 2018 at 7:59 AM Diogo N. Sampaio via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
Author: dnsampaio
Date: Wed Sep  5 07:56:21 2018
New Revision: 341475

URL: http://llvm.org/viewvc/llvm-project?rev=341475&view=rev
Log:
Fix arm_neon.h and arm_fp16.h generation for compiling with std=c89


Summary:
The inline attribute is not valid for C standard 89. Replace the argument in the generation of header files with __inline, as well adding tests for both header files.

Reviewers: pbarrio, SjoerdMeijer, javed.absar, t.p.northover

Subscribers: t.p.northover, kristof.beyls, chrib, cfe-commits

Differential Revision: https://reviews.llvm.org/D51683

test/Headers/arm-fp16-header.c
test/Headers/arm-neon-header.c
utils/TableGen/NeonEmitter.cpp

Added:
    cfe/trunk/test/Headers/arm-fp16-header.c
Modified:
    cfe/trunk/test/Headers/arm-neon-header.c
    cfe/trunk/utils/TableGen/NeonEmitter.cpp

Added: cfe/trunk/test/Headers/arm-fp16-header.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/arm-fp16-header.c?rev=341475&view=auto
==============================================================================
--- cfe/trunk/test/Headers/arm-fp16-header.c (added)
+++ cfe/trunk/test/Headers/arm-fp16-header.c Wed Sep  5 07:56:21 2018
@@ -0,0 +1,19 @@
+// RUN: %clang -fsyntax-only  -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c89 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c99 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c11 -xc %s
+
+// RUN: %clang -fsyntax-only -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c89 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c99 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c11 -xc %s
+
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++98 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++11 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++14 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++17 -xc++ %s
+
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++98 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++11 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++14 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++17 -xc++ %s
+
+#include <arm_fp16.h>

Modified: cfe/trunk/test/Headers/arm-neon-header.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/arm-neon-header.c?rev=341475&r1=341474&r2=341475&view=diff
==============================================================================
--- cfe/trunk/test/Headers/arm-neon-header.c (original)
+++ cfe/trunk/test/Headers/arm-neon-header.c Wed Sep  5 07:56:21 2018
@@ -2,4 +2,23 @@
 // RUN: %clang_cc1 -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -fno-lax-vector-conversions -ffreestanding %s
 // RUN: %clang_cc1 -x c++ -triple thumbv7-apple-darwin10 -target-cpu cortex-a8 -fsyntax-only -Wvector-conversions -ffreestanding %s

+// RUN: %clang -fsyntax-only -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c89 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c99 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c11 -xc %s
+
+// RUN: %clang -fsyntax-only -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c89 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c99 -xc %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c11 -xc %s
+
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++98 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++11 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++14 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-arm-none-eabi -march=armv8.2-a+fp16 -std=c++17 -xc++ %s
+
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++98 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++11 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++14 -xc++ %s
+// RUN: %clang -fsyntax-only -Wall -Werror -ffreestanding --target=aarch64-armeb-none-eabi -march=armv8.2-a+fp16 -std=c++17 -xc++ %s
+
 #include <arm_neon.h>
+

Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=341475&r1=341474&r2=341475&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Wed Sep  5 07:56:21 2018
@@ -2409,7 +2409,7 @@ void NeonEmitter::run(raw_ostream &OS) {
     OS << "#endif\n";
   OS << "\n";

-  OS << "#define __ai static inline __attribute__((__always_inline__, "
+  OS << "#define __ai static __inline __attribute__((__always_inline__, "
         "__nodebug__))\n\n";

   SmallVector<Intrinsic *, 128> Defs;
@@ -2518,7 +2518,7 @@ void NeonEmitter::runFP16(raw_ostream &O

   OS << "typedef __fp16 float16_t;\n";

-  OS << "#define __ai static inline __attribute__((__always_inline__, "
+  OS << "#define __ai static __inline __attribute__((__always_inline__, "
         "__nodebug__))\n\n";

   SmallVector<Intrinsic *, 128> Defs;


_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180906/754aa844/attachment-0001.html>


More information about the cfe-commits mailing list