[PATCH] D124863: [BOLT][TEST] Fix test failures on AArch64 builder

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 15:13:48 PDT 2022


Amir updated this revision to Diff 426859.
Amir added a comment.

Move puts to stub.h


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124863/new/

https://reviews.llvm.org/D124863

Files:
  bolt/test/Inputs/icf-jump-tables.c
  bolt/test/Inputs/stub.c
  bolt/test/Inputs/stub.h
  bolt/test/X86/Inputs/avx512.c
  bolt/test/X86/Inputs/inline-foo.c
  bolt/test/X86/inline-debug-info.test


Index: bolt/test/X86/inline-debug-info.test
===================================================================
--- bolt/test/X86/inline-debug-info.test
+++ bolt/test/X86/inline-debug-info.test
@@ -4,7 +4,7 @@
 # REQUIRES: system-linux
 
 # RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \
-# RUN:   -o %t.exe -Wl,-q
+# RUN:   -I%p/../Inputs -o %t.exe -Wl,-q
 # RUN: llvm-bolt %t.exe -update-debug-sections -print-debug-info \
 # RUN:   -print-only=main -print-after-lowering -force-inline=foo -o %t.bolt \
 # RUN:   | FileCheck %s
Index: bolt/test/X86/Inputs/inline-foo.c
===================================================================
--- bolt/test/X86/Inputs/inline-foo.c
+++ bolt/test/X86/Inputs/inline-foo.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "stub.h"
 
 void foo() {
   puts("Hello world!\n");
Index: bolt/test/X86/Inputs/avx512.c
===================================================================
--- bolt/test/X86/Inputs/avx512.c
+++ bolt/test/X86/Inputs/avx512.c
@@ -1,14 +1,9 @@
-#include <stdio.h>
-
 void use_avx512() {
-  printf("after first entry\n");
   asm (".byte 0x62, 0xe2, 0xf5, 0x70, 0x2c, 0xda");
-  asm ("secondary_entry:");
-  printf("after secondary entry\n");
+  asm("secondary_entry:");
 }
 
 int main() {
-  printf("about to use avx-512 instruction...\n");
   use_avx512();
 
   return 0;
Index: bolt/test/Inputs/stub.h
===================================================================
--- bolt/test/Inputs/stub.h
+++ bolt/test/Inputs/stub.h
@@ -5,5 +5,6 @@
 void *memset(void *dest, int c, unsigned long n);
 int printf(const char *format, ...);
 void exit(int status);
+int puts(const char *s);
 
 #endif
Index: bolt/test/Inputs/stub.c
===================================================================
--- bolt/test/Inputs/stub.c
+++ bolt/test/Inputs/stub.c
@@ -4,6 +4,7 @@
 void *memset(void *dest, int c, unsigned long n) { return 0; }
 int printf(const char *format, ...) { return 0; }
 void exit(int status) {}
+int puts(const char *s) { return 0; }
 
 void *__gxx_personality_v0;
 void *__cxa_allocate_exception;
Index: bolt/test/Inputs/icf-jump-tables.c
===================================================================
--- bolt/test/Inputs/icf-jump-tables.c
+++ bolt/test/Inputs/icf-jump-tables.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "stub.h"
 
 int inc(int x) {
   switch (x) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124863.426859.patch
Type: text/x-patch
Size: 2374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220503/a183eb3c/attachment.bin>


More information about the llvm-commits mailing list