[PATCH] D54449: [compiler-rt][builtins][PowerPC] Enable builtins tests on PowerPC 64 bit LE

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 14:12:37 PST 2018


amyk created this revision.
amyk added reviewers: nemanjai, echristo, hfinkel, weimingz, dschuff.
Herald added subscribers: jsji, dberris.

This patch aims to enable the tests for the builtin functions (that currently already exist for PowerPC within compiler-rt) for** PowerPC 64bit LE (ppc64le). **Previously when regression tests are run, these tests would be reported as `UNSUPPORTED`, perhaps due to the incorrect target architecture.

The following changes were made in this patch:

- Updating the `REQUIRES` line for each test, to enable testing on ppc64le
- Adding `%librt` in the `RUN` line, to link against compiler-rt when running the tests

With this patch, **seven tests are run, but two are failures.** The failures are from `floatditf.c` and `floatunditf.c` respectively, due to the use of `COMPILER_RT_ABI` in these two test files. This patch will require input on whether or not `COMPILER_RT_ABI` should or should not be included within these tests.


https://reviews.llvm.org/D54449

Files:
  compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c
  compiler-rt/test/builtins/Unit/ppc/floatditf_test.c
  compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c
  compiler-rt/test/builtins/Unit/ppc/qadd_test.c
  compiler-rt/test/builtins/Unit/ppc/qdiv_test.c
  compiler-rt/test/builtins/Unit/ppc/qmul_test.c
  compiler-rt/test/builtins/Unit/ppc/qsub_test.c


Index: compiler-rt/test/builtins/Unit/ppc/qsub_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/qsub_test.c
+++ compiler-rt/test/builtins/Unit/ppc/qsub_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdio.h>
 #include "DD.h"
 
Index: compiler-rt/test/builtins/Unit/ppc/qmul_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/qmul_test.c
+++ compiler-rt/test/builtins/Unit/ppc/qmul_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdio.h>
 #include "DD.h"
 
Index: compiler-rt/test/builtins/Unit/ppc/qdiv_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/qdiv_test.c
+++ compiler-rt/test/builtins/Unit/ppc/qdiv_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdio.h>
 #include "DD.h"
 
Index: compiler-rt/test/builtins/Unit/ppc/qadd_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/qadd_test.c
+++ compiler-rt/test/builtins/Unit/ppc/qadd_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdio.h>
 #include "DD.h"
 
Index: compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c
+++ compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdint.h>
 #include <stdio.h>
 
Index: compiler-rt/test/builtins/Unit/ppc/floatditf_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/floatditf_test.c
+++ compiler-rt/test/builtins/Unit/ppc/floatditf_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdint.h>
 #include <stdio.h>
 
Index: compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c
+++ compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c
@@ -1,5 +1,5 @@
-// REQUIRES: powerpc-registered-target
-// RUN: %clang_builtins %s -o %t && %run %t
+// REQUIRES: target-is-powerpc64le
+// RUN: %clang_builtins %s %librt -o %t && %run %t
 #include <stdio.h>
 #include <limits.h>
 #include <stdint.h>
@@ -476,4 +476,4 @@
 	}
 	
 	return 0;
-}
\ No newline at end of file
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54449.173703.patch
Type: text/x-patch
Size: 3313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181112/0d84246e/attachment.bin>


More information about the llvm-commits mailing list