зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1753859 - Remove changes to clang/test/CodeGen/alloc-fns-alignment.c from patches. r=firefox-build-system-reviewers,andi
We don't run tests, and this will help reduce the amount of changes needed to adjust the patches to newer clang trunk. Differential Revision: https://phabricator.services.mozilla.com/D138114
This commit is contained in:
Родитель
b86d9b610e
Коммит
8d35881c8d
|
@ -13,7 +13,6 @@
|
|||
"compiler-rt-13-no-codesign.patch",
|
||||
"revert-llvmorg-14-init-3652-gf3c2094d8c11.patch",
|
||||
"revert-llvmorg-14-init-3651-g85ba583eba19.patch",
|
||||
"revert-llvmorg-14-init-3650-g50d7ecc560b2.patch",
|
||||
"revert-llvmorg-13-init-8182-gc2297544c047.patch"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -42,44 +42,3 @@ index 47a4ed35be85..f77db7bdcecf 100644
|
|||
}
|
||||
|
||||
// 'const', 'pure' and 'noalias' attributed functions are also nounwind.
|
||||
diff --git a/clang/test/CodeGen/alloc-fns-alignment.c b/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
deleted file mode 100644
|
||||
index d2f9b467196a..000000000000
|
||||
--- a/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
+++ /dev/null
|
||||
@@ -1,35 +0,0 @@
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN8
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-malloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-MALLOC
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-calloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-CALLOC
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-realloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-REALLOC
|
||||
-
|
||||
-typedef __SIZE_TYPE__ size_t;
|
||||
-
|
||||
-void *malloc(size_t);
|
||||
-void *calloc(size_t, size_t);
|
||||
-void *realloc(void *, size_t);
|
||||
-
|
||||
-void *malloc_test(size_t n) {
|
||||
- return malloc(n);
|
||||
-}
|
||||
-
|
||||
-void *calloc_test(size_t n) {
|
||||
- return calloc(1, n);
|
||||
-}
|
||||
-
|
||||
-void *raalloc_test(void *p, size_t n) {
|
||||
- return realloc(p, n);
|
||||
-}
|
||||
-
|
||||
-// ALIGN16: align 16 i8* @malloc
|
||||
-// ALIGN16: align 16 i8* @calloc
|
||||
-// ALIGN16: align 16 i8* @realloc
|
||||
-// ALIGN8: align 8 i8* @malloc
|
||||
-// ALIGN8: align 8 i8* @calloc
|
||||
-// ALIGN8: align 8 i8* @realloc
|
||||
-// NOBUILTIN-MALLOC: declare i8* @malloc
|
||||
-// NOBUILTIN-CALLOC: declare i8* @calloc
|
||||
-// NOBUILTIN-REALLOC: declare i8* @realloc
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
diff --git a/clang/test/CodeGen/alloc-fns-alignment.c b/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
index 1ce0cfbad97b..d2f9b467196a 100644
|
||||
--- a/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
+++ b/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
@@ -5,14 +5,12 @@
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-malloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-MALLOC
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-calloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-CALLOC
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-realloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-REALLOC
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-aligned_alloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-ALIGNED_ALLOC
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
void *malloc(size_t);
|
||||
void *calloc(size_t, size_t);
|
||||
void *realloc(void *, size_t);
|
||||
-void *aligned_alloc(size_t, size_t);
|
||||
|
||||
void *malloc_test(size_t n) {
|
||||
return malloc(n);
|
||||
@@ -22,59 +20,16 @@ void *calloc_test(size_t n) {
|
||||
return calloc(1, n);
|
||||
}
|
||||
|
||||
-void *realloc_test(void *p, size_t n) {
|
||||
+void *raalloc_test(void *p, size_t n) {
|
||||
return realloc(p, n);
|
||||
}
|
||||
|
||||
-void *aligned_alloc_variable_test(size_t n, size_t a) {
|
||||
- return aligned_alloc(a, n);
|
||||
-}
|
||||
-
|
||||
-void *aligned_alloc_constant_test(size_t n) {
|
||||
- return aligned_alloc(8, n);
|
||||
-}
|
||||
-
|
||||
-void *aligned_alloc_large_constant_test(size_t n) {
|
||||
- return aligned_alloc(4096, n);
|
||||
-}
|
||||
-
|
||||
-// CHECK-LABEL: @malloc_test
|
||||
// ALIGN16: align 16 i8* @malloc
|
||||
-
|
||||
-// CHECK-LABEL: @calloc_test
|
||||
// ALIGN16: align 16 i8* @calloc
|
||||
-
|
||||
-// CHECK-LABEL: @realloc_test
|
||||
// ALIGN16: align 16 i8* @realloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_variable_test
|
||||
-// ALIGN16: align 16 i8* @aligned_alloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_constant_test
|
||||
-// ALIGN16: align 16 i8* @aligned_alloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_large_constant_test
|
||||
-// ALIGN16: align 16 i8* @aligned_alloc
|
||||
-
|
||||
-// CHECK-LABEL: @malloc_test
|
||||
// ALIGN8: align 8 i8* @malloc
|
||||
-
|
||||
-// CHECK-LABEL: @calloc_test
|
||||
// ALIGN8: align 8 i8* @calloc
|
||||
-
|
||||
-// CHECK-LABEL: @realloc_test
|
||||
// ALIGN8: align 8 i8* @realloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_variable_test
|
||||
-// ALIGN8: align 8 i8* @aligned_alloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_constant_test
|
||||
-// ALIGN8: align 8 i8* @aligned_alloc
|
||||
-
|
||||
-// CHECK-LABEL: @aligned_alloc_large_constant_test
|
||||
-// ALIGN8: align 8 i8* @aligned_alloc
|
||||
-
|
||||
// NOBUILTIN-MALLOC: declare i8* @malloc
|
||||
// NOBUILTIN-CALLOC: declare i8* @calloc
|
||||
// NOBUILTIN-REALLOC: declare i8* @realloc
|
||||
-// NOBUILTIN-ALIGNED_ALLOC: declare i8* @aligned_alloc
|
|
@ -13,33 +13,3 @@ index 421ca95bb543..506af5d1458c 100644
|
|||
case Builtin::BIcalloc:
|
||||
case Builtin::BImalloc:
|
||||
case Builtin::BImemalign:
|
||||
diff --git a/clang/test/CodeGen/alloc-fns-alignment.c b/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
index b19cf867f74c..1ce0cfbad97b 100644
|
||||
--- a/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
+++ b/clang/test/CodeGen/alloc-fns-alignment.c
|
||||
@@ -48,14 +48,13 @@ void *aligned_alloc_large_constant_test(size_t n) {
|
||||
// ALIGN16: align 16 i8* @realloc
|
||||
|
||||
// CHECK-LABEL: @aligned_alloc_variable_test
|
||||
-// ALIGN16: %[[ALLOCATED:.*]] = call align 16 i8* @aligned_alloc({{i32|i64}} noundef %[[ALIGN:.*]], {{i32|i64}} noundef %[[NBYTES:.*]])
|
||||
-// ALIGN16-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[ALLOCATED]], {{i32|i64}} %[[ALIGN]]) ]
|
||||
+// ALIGN16: align 16 i8* @aligned_alloc
|
||||
|
||||
// CHECK-LABEL: @aligned_alloc_constant_test
|
||||
// ALIGN16: align 16 i8* @aligned_alloc
|
||||
|
||||
// CHECK-LABEL: @aligned_alloc_large_constant_test
|
||||
-// ALIGN16: align 4096 i8* @aligned_alloc
|
||||
+// ALIGN16: align 16 i8* @aligned_alloc
|
||||
|
||||
// CHECK-LABEL: @malloc_test
|
||||
// ALIGN8: align 8 i8* @malloc
|
||||
@@ -73,7 +72,7 @@ void *aligned_alloc_large_constant_test(size_t n) {
|
||||
// ALIGN8: align 8 i8* @aligned_alloc
|
||||
|
||||
// CHECK-LABEL: @aligned_alloc_large_constant_test
|
||||
-// ALIGN8: align 4096 i8* @aligned_alloc
|
||||
+// ALIGN8: align 8 i8* @aligned_alloc
|
||||
|
||||
// NOBUILTIN-MALLOC: declare i8* @malloc
|
||||
// NOBUILTIN-CALLOC: declare i8* @calloc
|
||||
|
|
Загрузка…
Ссылка в новой задаче