brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · fee430f Raw
69 lines · plain
1// RUN: %clang -### --target=x86_64-linux-gnu \2// RUN:   -x hip \3// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \4// RUN:   --offload-arch=gfx908:xnack+:sramecc- \5// RUN:   --no-offload-new-driver --rocm-path=%S/Inputs/rocm \6// RUN:   %s 2>&1 | FileCheck %s7 8// RUN: %clang -### --target=x86_64-linux-gnu \9// RUN:   -x hip \10// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \11// RUN:   --offload-arch=gfx908:xnack+:sramecc- \12// RUN:   --rocm-path=%S/Inputs/rocm \13// RUN:   --no-offload-new-driver -save-temps \14// RUN:   %s 2>&1 | FileCheck --check-prefixes=CHECK,TMP %s15 16// RUN: %clang -### --target=x86_64-linux-gnu \17// RUN:   -x hip \18// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \19// RUN:   --offload-arch=gfx908:xnack+:sramecc- \20// RUN:   --rocm-path=%S/Inputs/rocm \21// RUN:   --no-offload-new-driver -fgpu-rdc \22// RUN:   %s 2>&1 | FileCheck --check-prefixes=CHECK %s23 24// CHECK: [[CLANG:"[^"]*clang[^"]*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa"25// CHECK-SAME: "-target-cpu" "gfx908"26// CHECK-SAME: "-target-feature" "+sramecc"27// CHECK-SAME: "-target-feature" "+xnack"28 29// TMP: [[CLANG:"[^"]*clang[^"]*"]] "-cc1as" "-triple" "amdgcn-amd-amdhsa"30// TMP-SAME: "-target-cpu" "gfx908"31// TMP-SAME: "-target-feature" "+sramecc"32// TMP-SAME: "-target-feature" "+xnack"33 34// CHECK: [[LLD:"[^"]*lld[^"]*"]] {{.*}} "-plugin-opt=mcpu=gfx908"35// CHECK-SAME: "-plugin-opt=-mattr=+sramecc,+xnack"36 37// CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"38// CHECK-SAME: "-target-cpu" "gfx908"39// CHECK-SAME: "-target-feature" "-sramecc"40// CHECK-SAME: "-target-feature" "+xnack"41 42// CHECK: [[LLD]] {{.*}} "-plugin-opt=mcpu=gfx908"43// CHECK-SAME: "-plugin-opt=-mattr=-sramecc,+xnack"44 45// CHECK: {{"[^"]*clang-offload-bundler[^"]*"}}46// CHECK-SAME: "-targets=host-x86_64-unknown-linux-gnu,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc+:xnack+,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc-:xnack+"47 48// Check canonicalization and repeating of target ID.49 50// RUN: %clang -### --target=x86_64-linux-gnu \51// RUN:   -x hip \52// RUN:   --offload-arch=fiji \53// RUN:   --offload-arch=gfx803 \54// RUN:   --offload-arch=fiji \55// RUN:   --no-offload-new-driver --rocm-path=%S/Inputs/rocm \56// RUN:   %s 2>&1 | FileCheck -check-prefix=FIJI %s57// FIJI: "-targets=host-x86_64-unknown-linux-gnu,hipv4-amdgcn-amd-amdhsa--gfx803"58 59// RUN: not %clang -### --target=x86_64-linux-gnu \60// RUN:   -x hip \61// RUN:   --offload-arch=gfx900:xnack- \62// RUN:   --offload-arch=gfx900:xnack+ \63// RUN:   --offload-arch=gfx908:sramecc+ \64// RUN:   --offload-arch=gfx908:sramecc- \65// RUN:   --offload-arch=gfx906 \66// RUN:   --no-offload-new-driver --rocm-path=%S/Inputs/rocm \67// RUN:   %s 2>&1 | FileCheck -check-prefix=MULTI %s68// MULTI: "-targets=host-x86_64-unknown-linux-gnu,hipv4-amdgcn-amd-amdhsa--gfx900:xnack+,hipv4-amdgcn-amd-amdhsa--gfx900:xnack-,hipv4-amdgcn-amd-amdhsa--gfx906,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc+,hipv4-amdgcn-amd-amdhsa--gfx908:sramecc-"69