Re: [PATCH] D24825: [X86] Remove the mm_malloc.h include guard hack from the X86 builtins tests

2016-09-28 Thread Elad Cohen via cfe-commits
eladcohen added a comment.

Thanks for the review! committed r282581.


Repository:
  rL LLVM

https://reviews.llvm.org/D24825



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D24825: [X86] Remove the mm_malloc.h include guard hack from the X86 builtins tests

2016-09-28 Thread Elad Cohen via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282581: [X86] Remove the mm_malloc.h include guard hack from 
the X86 builtins tests (authored by eladcohen).

Changed prior to commit:
  https://reviews.llvm.org/D24825?vs=72158=72805#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24825

Files:
  cfe/trunk/test/CodeGen/3dnow-builtins.c
  cfe/trunk/test/CodeGen/avx-builtins.c
  cfe/trunk/test/CodeGen/avx-cmp-builtins.c
  cfe/trunk/test/CodeGen/avx-shuffle-builtins.c
  cfe/trunk/test/CodeGen/avx2-builtins.c
  cfe/trunk/test/CodeGen/avx512bw-builtins.c
  cfe/trunk/test/CodeGen/avx512cdintrin.c
  cfe/trunk/test/CodeGen/avx512dq-builtins.c
  cfe/trunk/test/CodeGen/avx512er-builtins.c
  cfe/trunk/test/CodeGen/avx512f-builtins.c
  cfe/trunk/test/CodeGen/avx512ifma-builtins.c
  cfe/trunk/test/CodeGen/avx512pf-builtins.c
  cfe/trunk/test/CodeGen/avx512vbmi-builtins.c
  cfe/trunk/test/CodeGen/avx512vbmivl-builtin.c
  cfe/trunk/test/CodeGen/avx512vl-builtins.c
  cfe/trunk/test/CodeGen/avx512vlbw-builtins.c
  cfe/trunk/test/CodeGen/avx512vlcd-builtins.c
  cfe/trunk/test/CodeGen/avx512vldq-builtins.c
  cfe/trunk/test/CodeGen/bitscan-builtins.c
  cfe/trunk/test/CodeGen/bmi-builtins.c
  cfe/trunk/test/CodeGen/bmi2-builtins.c
  cfe/trunk/test/CodeGen/f16c-builtins.c
  cfe/trunk/test/CodeGen/fma-builtins.c
  cfe/trunk/test/CodeGen/fma4-builtins.c
  cfe/trunk/test/CodeGen/fsgsbase-builtins.c
  cfe/trunk/test/CodeGen/lzcnt-builtins.c
  cfe/trunk/test/CodeGen/mmx-builtins.c
  cfe/trunk/test/CodeGen/pclmul-builtins.c
  cfe/trunk/test/CodeGen/pku.c
  cfe/trunk/test/CodeGen/popcnt-builtins.c
  cfe/trunk/test/CodeGen/prefetchw-builtins.c
  cfe/trunk/test/CodeGen/rd-builtins.c
  cfe/trunk/test/CodeGen/rdrand-builtins.c
  cfe/trunk/test/CodeGen/rtm-builtins.c
  cfe/trunk/test/CodeGen/sha-builtins.c
  cfe/trunk/test/CodeGen/sse-builtins.c
  cfe/trunk/test/CodeGen/sse.c
  cfe/trunk/test/CodeGen/sse2-builtins.c
  cfe/trunk/test/CodeGen/sse3-builtins.c
  cfe/trunk/test/CodeGen/sse41-builtins.c
  cfe/trunk/test/CodeGen/sse42-builtins.c
  cfe/trunk/test/CodeGen/sse4a-builtins.c
  cfe/trunk/test/CodeGen/ssse3-builtins.c
  cfe/trunk/test/CodeGen/tbm-builtins.c
  cfe/trunk/test/CodeGen/vector.c
  cfe/trunk/test/CodeGen/xop-builtins.c

Index: cfe/trunk/test/CodeGen/sha-builtins.c
===
--- cfe/trunk/test/CodeGen/sha-builtins.c
+++ cfe/trunk/test/CodeGen/sha-builtins.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -o - | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: cfe/trunk/test/CodeGen/avx512cdintrin.c
===
--- cfe/trunk/test/CodeGen/avx512cdintrin.c
+++ cfe/trunk/test/CodeGen/avx512cdintrin.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: cfe/trunk/test/CodeGen/sse3-builtins.c
===
--- cfe/trunk/test/CodeGen/sse3-builtins.c
+++ cfe/trunk/test/CodeGen/sse3-builtins.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse3 -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse3 -emit-llvm -o - -Wall -Werror | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: cfe/trunk/test/CodeGen/avx512vbmi-builtins.c
===
--- cfe/trunk/test/CodeGen/avx512vbmi-builtins.c
+++ cfe/trunk/test/CodeGen/avx512vbmi-builtins.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -emit-llvm -o - -Wall -Werror | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: cfe/trunk/test/CodeGen/sse.c
===
--- cfe/trunk/test/CodeGen/sse.c
+++ cfe/trunk/test/CodeGen/sse.c
@@ -1,8 +1,6 @@
-// RUN: %clang_cc1 -O3 -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding -O3 -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s
 // FIXME: This test 

[PATCH] D24825: [X86] Remove the mm_malloc.h include guard hack from the X86 builtins tests

2016-09-22 Thread Elad Cohen via cfe-commits
eladcohen created this revision.
eladcohen added a subscriber: cfe-commits.

The X86 clang/test/CodeGen/*builtins.c tests define the mm_malloc.h include 
guard as a hack for avoiding its inclusion (mm_malloc.h requires a hosted 
environment since it expects stdlib.h to be available - which is not the case 
in these internal clang codegen tests).

This patch removes this hack and instead passes -ffreestanding to clang cc1.


https://reviews.llvm.org/D24825

Files:
  test/CodeGen/3dnow-builtins.c
  test/CodeGen/avx-builtins.c
  test/CodeGen/avx-cmp-builtins.c
  test/CodeGen/avx-shuffle-builtins.c
  test/CodeGen/avx2-builtins.c
  test/CodeGen/avx512bw-builtins.c
  test/CodeGen/avx512cdintrin.c
  test/CodeGen/avx512dq-builtins.c
  test/CodeGen/avx512er-builtins.c
  test/CodeGen/avx512f-builtins.c
  test/CodeGen/avx512ifma-builtins.c
  test/CodeGen/avx512pf-builtins.c
  test/CodeGen/avx512vbmi-builtins.c
  test/CodeGen/avx512vbmivl-builtin.c
  test/CodeGen/avx512vl-builtins.c
  test/CodeGen/avx512vlbw-builtins.c
  test/CodeGen/avx512vlcd-builtins.c
  test/CodeGen/avx512vldq-builtins.c
  test/CodeGen/bitscan-builtins.c
  test/CodeGen/bmi-builtins.c
  test/CodeGen/bmi2-builtins.c
  test/CodeGen/f16c-builtins.c
  test/CodeGen/fma-builtins.c
  test/CodeGen/fma4-builtins.c
  test/CodeGen/fsgsbase-builtins.c
  test/CodeGen/lzcnt-builtins.c
  test/CodeGen/mmx-builtins.c
  test/CodeGen/pclmul-builtins.c
  test/CodeGen/pku.c
  test/CodeGen/popcnt-builtins.c
  test/CodeGen/prefetchw-builtins.c
  test/CodeGen/rd-builtins.c
  test/CodeGen/rdrand-builtins.c
  test/CodeGen/rtm-builtins.c
  test/CodeGen/sha-builtins.c
  test/CodeGen/sse-builtins.c
  test/CodeGen/sse.c
  test/CodeGen/sse2-builtins.c
  test/CodeGen/sse3-builtins.c
  test/CodeGen/sse41-builtins.c
  test/CodeGen/sse42-builtins.c
  test/CodeGen/sse4a-builtins.c
  test/CodeGen/ssse3-builtins.c
  test/CodeGen/tbm-builtins.c
  test/CodeGen/vector.c
  test/CodeGen/xop-builtins.c

Index: test/CodeGen/xop-builtins.c
===
--- test/CodeGen/xop-builtins.c
+++ test/CodeGen/xop-builtins.c
@@ -1,8 +1,6 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: test/CodeGen/vector.c
===
--- test/CodeGen/vector.c
+++ test/CodeGen/vector.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -O1 -target-cpu core2 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding -triple i386-apple-darwin9 -O1 -target-cpu core2 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 typedef short __v4hi __attribute__ ((__vector_size__ (8)));
 
 void test1() {
@@ -20,8 +20,6 @@
 
 
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: test/CodeGen/tbm-builtins.c
===
--- test/CodeGen/tbm-builtins.c
+++ test/CodeGen/tbm-builtins.c
@@ -1,10 +1,8 @@
-// RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s
 // FIXME: The code generation checks for add/sub and/or are depending on the optimizer.
 // The REQUIRES keyword will be removed when the FIXME is complete.
 // REQUIRES: x86-registered-target
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: test/CodeGen/ssse3-builtins.c
===
--- test/CodeGen/ssse3-builtins.c
+++ test/CodeGen/ssse3-builtins.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s
 
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
 
 #include 
 
Index: test/CodeGen/sse4a-builtins.c
===
--- test/CodeGen/sse4a-builtins.c
+++ test/CodeGen/sse4a-builtins.c
@@ -1,7 +1,5 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4a -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding %s