[PATCH] D89696: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 19 06:24:55 PDT 2020
jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, guansong, yaxunl.
Herald added a project: clang.
jhuber6 requested review of this revision.
Herald added a subscriber: sstefan1.
The changes made in D88594 <https://reviews.llvm.org/D88594> caused the test OpenMP/driver.c to fail on a 32-bit host becuase it was offloading to a 64-bit architecture by default. The offloading test was moved to a new file and a feature was added to the lit config to check for a 64-bit host.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89696
Files:
clang/test/OpenMP/driver-openmp-target.c
clang/test/OpenMP/driver.c
clang/test/lit.cfg.py
Index: clang/test/lit.cfg.py
===================================================================
--- clang/test/lit.cfg.py
+++ clang/test/lit.cfg.py
@@ -1,6 +1,7 @@
# -*- Python -*-
import os
+import sys
import platform
import re
import subprocess
@@ -167,6 +168,10 @@
if platform.system() not in ['Windows']:
config.available_features.add('can-remove-opened-file')
+# Check 64-bit host
+if sys.maxsize > 2**32:
+ config.available_features.add("clang-64-bits")
+
def calculate_arch_features(arch_string):
features = []
Index: clang/test/OpenMP/driver.c
===================================================================
--- clang/test/OpenMP/driver.c
+++ clang/test/OpenMP/driver.c
@@ -27,7 +27,6 @@
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 | FileCheck --check-prefix=CHECK-45-VERSION %s
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-simd | FileCheck --check-prefix=CHECK-45-VERSION %s
-// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-targets=x86_64-unknown-unknown -o - | FileCheck --check-prefix=CHECK-45-VERSION --check-prefix=CHECK-45-VERSION2 %s
// CHECK-45-VERSION: #define _OPENMP 201511
// CHECK-45-VERSION2: #define _OPENMP 201511
Index: clang/test/OpenMP/driver-openmp-target.c
===================================================================
--- /dev/null
+++ clang/test/OpenMP/driver-openmp-target.c
@@ -0,0 +1,5 @@
+// REQUIRES: x86-registered-target
+// REQUIRES: clang-64-bits
+// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-targets=x86_64-unknown-unknown -o - | FileCheck --check-prefix=CHECK-45-VERSION --check-prefix=CHECK-45-VERSION2 %s
+// CHECK-45-VERSION: #define _OPENMP 201511
+// CHECK-45-VERSION2: #define _OPENMP 201511
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89696.299035.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201019/851cd752/attachment-0001.bin>
More information about the cfe-commits
mailing list