Skip to content

Commit 64bd4d9

Browse files
committed
[FIX] Add nvptx as required target for some OpenMP tests
Those tests set nvptx64 in IR but doesn't require the target. The optimization now needs TTI such that if nvptx is not registered, it just uses whatever default target is, which will cause the check lines mismatch.
1 parent ced1f50 commit 64bd4d9

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

llvm/test/Transforms/OpenMP/nested_parallelism.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
2-
; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s
2+
; RUN: opt -S -mtriple=nvptx64 -passes=openmp-opt < %s | FileCheck %s
3+
; REQUIRES: nvptx-registered-target
34

45
; void foo1(int i) {
56
; #pragma omp parallel
@@ -20,8 +21,6 @@
2021
; foo1(i);
2122
; }
2223

23-
target triple = "nvptx64"
24-
2524
%struct.ident_t = type { i32, i32, i32, i32, ptr }
2625
%struct.KernelEnvironmentTy = type { %struct.ConfigurationEnvironmentTy, ptr, ptr }
2726
%struct.ConfigurationEnvironmentTy = type { i8, i8, i8, i32, i32, i32, i32, i32, i32 }

llvm/test/Transforms/OpenMP/remove_globalization.ll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
22
; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s
3-
; RUN: opt -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS
4-
; RUN: opt -openmp-opt-disable-deglobalization -S -passes=openmp-opt < %s | FileCheck %s --check-prefix=CHECK-DISABLED
5-
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
6-
target triple = "nvptx64"
3+
; RUN: opt -mtriple=nvptx64 -passes=openmp-opt -pass-remarks=openmp-opt -pass-remarks-missed=openmp-opt -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK-REMARKS
4+
; RUN: opt -mtriple=nvptx64 -openmp-opt-disable-deglobalization -S -passes=openmp-opt < %s | FileCheck %s --check-prefix=CHECK-DISABLED
5+
; REQUIRES: nvptx-registered-target
76

87
@S = external local_unnamed_addr global ptr
98
%struct.KernelEnvironmentTy = type { %struct.ConfigurationEnvironmentTy, ptr, ptr }

llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
2-
; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s --check-prefixes=CHECK
3-
; RUN: opt -S -passes=openmp-opt -openmp-opt-disable-spmdization < %s | FileCheck %s --check-prefixes=CHECK-DISABLE-SPMDIZATION
2+
; RUN: opt -S -mtriple=nvptx64 -passes=openmp-opt < %s | FileCheck %s --check-prefixes=CHECK
3+
; RUN: opt -S -mtriple=nvptx64 -passes=openmp-opt -openmp-opt-disable-spmdization < %s | FileCheck %s --check-prefixes=CHECK-DISABLE-SPMDIZATION
4+
; REQUIRES: nvptx-registered-target
45
;
56
; int G;
67
;
@@ -26,8 +27,6 @@
2627
; generic_helper();
2728
; }
2829
;
29-
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
30-
target triple = "nvptx64"
3130

3231
%struct.ident_t = type { i32, i32, i32, i32, ptr }
3332
%struct.ConfigurationEnvironmentTy = type { i8, i8, i8, i32, i32, i32, i32, i32, i32 }

llvm/test/Transforms/OpenMP/spmdization_no_guarding_two_reaching_kernels.ll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
2-
; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s --check-prefixes=CHECK
3-
; RUN: opt -S -passes=openmp-opt -openmp-opt-disable-spmdization < %s | FileCheck %s --check-prefixes=CHECK-DISABLE-SPMDIZATION
2+
; RUN: opt -S -mtriple=nvptx64 -passes=openmp-opt < %s | FileCheck %s --check-prefixes=CHECK
3+
; RUN: opt -S -mtriple=nvptx64 -passes=openmp-opt -openmp-opt-disable-spmdization < %s | FileCheck %s --check-prefixes=CHECK-DISABLE-SPMDIZATION
4+
; REQUIRES: nvptx-registered-target
45
;
56
; __local int G;
67
;
@@ -27,8 +28,6 @@
2728
; generic_helper();
2829
; }
2930
;
30-
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
31-
target triple = "nvptx64"
3231

3332
%struct.ident_t = type { i32, i32, i32, i32, ptr }
3433
%struct.ConfigurationEnvironmentTy = type { i8, i8, i8, i32, i32, i32, i32, i32, i32 }

0 commit comments

Comments
 (0)