|
1 | 1 | ! Test that flang-new OpenMP and OpenMP offload related
|
2 | 2 | ! commands forward or expand to the appropriate commands
|
3 |
| -! for flang-new -fc1 as expected. |
| 3 | +! for flang-new -fc1 as expected. Assumes a gfx90a, aarch64, |
| 4 | +! and sm_70 architecture, but doesn't require one to be |
| 5 | +! installed or compiled for, just testing the appropriate |
| 6 | +! generation of jobs are created with the correct |
| 7 | +! corresponding arguments. |
4 | 8 |
|
5 | 9 | ! Test regular -fopenmp with no offload
|
6 | 10 | ! RUN: %flang -### -fopenmp %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP %s
|
|
44 | 48 | ! OFFLOAD-DEVICE-NOT: "{{[^"]*}}flang-new" "-fc1" "-triple" "aarch64-unknown-linux-gnu"
|
45 | 49 |
|
46 | 50 | ! Test regular -fopenmp with offload for basic fopenmp-is-target-device flag addition and correct fopenmp
|
47 |
| -! RUN: not %flang -### -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP-IS-TARGET-DEVICE %s |
| 51 | +! RUN: %flang -### -fopenmp --offload-arch=gfx90a -fopenmp-targets=amdgcn-amd-amdhsa %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP-IS-TARGET-DEVICE %s |
48 | 52 | ! CHECK-OPENMP-IS-TARGET-DEVICE: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" {{.*}}.f90"
|
49 | 53 |
|
50 | 54 | ! Testing appropriate flags are gnerated and appropriately assigned by the driver when offloading
|
|
58 | 62 | ! OPENMP-OFFLOAD-ARGS-NEXT: "{{[^"]*}}flang-new" "-fc1" "-triple" "aarch64-unknown-linux-gnu" {{.*}} "-fopenmp" {{.*}} "-fembed-offload-object={{.*}}.out" {{.*}}.bc"
|
59 | 63 |
|
60 | 64 | ! Test -fopenmp with offload for RTL Flag Options
|
61 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
62 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 65 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 66 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 67 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
63 | 68 | ! RUN: -fopenmp-assume-threads-oversubscription \
|
64 | 69 | ! RUN: | FileCheck %s --check-prefixes=CHECK-THREADS-OVS
|
65 | 70 | ! CHECK-THREADS-OVS: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-assume-threads-oversubscription" {{.*}}.f90"
|
66 | 71 |
|
67 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
68 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 72 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 73 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 74 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
69 | 75 | ! RUN: -fopenmp-assume-teams-oversubscription \
|
70 | 76 | ! RUN: | FileCheck %s --check-prefixes=CHECK-TEAMS-OVS
|
71 | 77 | ! CHECK-TEAMS-OVS: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-assume-teams-oversubscription" {{.*}}.f90"
|
72 | 78 |
|
73 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
74 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 79 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 80 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 81 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
75 | 82 | ! RUN: -fopenmp-assume-no-nested-parallelism \
|
76 | 83 | ! RUN: | FileCheck %s --check-prefixes=CHECK-NEST-PAR
|
77 | 84 | ! CHECK-NEST-PAR: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-assume-no-nested-parallelism" {{.*}}.f90"
|
78 | 85 |
|
79 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
80 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 86 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 87 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 88 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
81 | 89 | ! RUN: -fopenmp-assume-no-thread-state \
|
82 | 90 | ! RUN: | FileCheck %s --check-prefixes=CHECK-THREAD-STATE
|
83 | 91 | ! CHECK-THREAD-STATE: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-assume-no-thread-state" {{.*}}.f90"
|
84 | 92 |
|
85 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
86 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 93 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 94 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 95 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
87 | 96 | ! RUN: -fopenmp-target-debug \
|
88 | 97 | ! RUN: | FileCheck %s --check-prefixes=CHECK-TARGET-DEBUG
|
89 | 98 | ! CHECK-TARGET-DEBUG: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-target-debug" {{.*}}.f90"
|
90 | 99 |
|
91 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
92 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 100 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 101 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 102 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
93 | 103 | ! RUN: -fopenmp-target-debug \
|
94 | 104 | ! RUN: | FileCheck %s --check-prefixes=CHECK-TARGET-DEBUG
|
95 | 105 | ! CHECK-TARGET-DEBUG-EQ: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-target-debug=111" {{.*}}.f90"
|
96 | 106 |
|
97 |
| -! RUN: not %flang -S -### %s -o %t 2>&1 \ |
98 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 107 | +! RUN: %flang -S -### %s -o %t 2>&1 \ |
| 108 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 109 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
99 | 110 | ! RUN: -fopenmp-target-debug -fopenmp-assume-threads-oversubscription \
|
100 | 111 | ! RUN: -fopenmp-assume-teams-oversubscription -fopenmp-assume-no-nested-parallelism \
|
101 | 112 | ! RUN: -fopenmp-assume-no-thread-state \
|
|
104 | 115 | ! CHECK-RTL-ALL: "-fopenmp-assume-threads-oversubscription" "-fopenmp-assume-no-thread-state" "-fopenmp-assume-no-nested-parallelism"
|
105 | 116 | ! CHECK-RTL-ALL: {{.*}}.f90"
|
106 | 117 |
|
107 |
| -! RUN: not %flang -### %s -o %t 2>&1 \ |
108 |
| -! RUN: -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \ |
| 118 | +! RUN: %flang -### %s -o %t 2>&1 \ |
| 119 | +! RUN: -fopenmp --offload-arch=gfx90a \ |
| 120 | +! RUN: -fopenmp-targets=amdgcn-amd-amdhsa \ |
109 | 121 | ! RUN: -fopenmp-version=45 \
|
110 | 122 | ! RUN: | FileCheck %s --check-prefixes=CHECK-OPENMP-VERSION
|
111 | 123 | ! CHECK-OPENMP-VERSION: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" "-fopenmp-version=45" {{.*}}.f90"
|
|
0 commit comments