Skip to content

Commit 139b7d1

Browse files
author
Pavel V Chupin
committed
[Upstream] Fix number of new issues comming from upstream
* Fix NVPTX backend build issue * Fix few tests by adding -opaque-pointers explicitly. We are behind upstream on opaque pointers enabling and opaque pointers currently OFF. So explicit flag is required.
1 parent ff19913 commit 139b7d1

File tree

7 files changed

+11
-13
lines changed

7 files changed

+11
-13
lines changed

clang/test/CodeGenCUDA/amdgpu-asan.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
// Check sanitizer runtime library functions survive
77
// optimizations without being removed or parameters altered.
88

9-
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
9+
// RUN: %clang_cc1 %s -opaque-pointers -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
1010
// RUN: -fcuda-is-device -target-cpu gfx906 -fsanitize=address \
1111
// RUN: -mlink-bitcode-file %t.asanrtl.bc -x hip \
1212
// RUN: | FileCheck -check-prefixes=ASAN %s
1313

14-
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
14+
// RUN: %clang_cc1 %s -opaque-pointers -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
1515
// RUN: -fcuda-is-device -target-cpu gfx906 -fsanitize=address \
1616
// RUN: -O3 -mlink-bitcode-file %t.asanrtl.bc -x hip \
1717
// RUN: | FileCheck -check-prefixes=ASAN %s
1818

19-
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
19+
// RUN: %clang_cc1 %s -opaque-pointers -emit-llvm -o - -triple=amdgcn-amd-amdhsa \
2020
// RUN: -fcuda-is-device -target-cpu gfx906 -x hip \
2121
// RUN: | FileCheck %s
2222

clang/test/Driver/linker-wrapper-image.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// REQUIRES: amdgpu-registered-target
44

55
// RUN: clang-offload-packager -o %t.out --image=file=%S/Inputs/dummy-elf.o,kind=openmp,triple=nvptx64-nvidia-cuda,arch=sm_70
6-
// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -emit-obj -o %t.o \
6+
// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -opaque-pointers -emit-obj -o %t.o \
77
// RUN: -fembed-offload-object=%t.out
8-
// RUN: clang-linker-wrapper --print-wrapped-module --dry-run --host-triple x86_64-unknown-linux-gnu \
8+
// RUN: clang-linker-wrapper --print-wrapped-module -opaque-pointers --dry-run --host-triple x86_64-unknown-linux-gnu \
99
// RUN: -linker-path /usr/bin/ld -- %t.o -o a.out 2>&1 | FileCheck %s --check-prefix=OPENMP
1010

1111
// OPENMP: @__start_omp_offloading_entries = external hidden constant %__tgt_offload_entry
@@ -30,9 +30,9 @@
3030
// OPENMP-NEXT: }
3131

3232
// RUN: clang-offload-packager -o %t.out --image=file=%S/Inputs/dummy-elf.o,kind=cuda,triple=nvptx64-nvidia-cuda,arch=sm_70
33-
// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -emit-obj -o %t.o \
33+
// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -opaque-pointers -emit-obj -o %t.o \
3434
// RUN: -fembed-offload-object=%t.out
35-
// RUN: clang-linker-wrapper --print-wrapped-module --dry-run --host-triple x86_64-unknown-linux-gnu \
35+
// RUN: clang-linker-wrapper --print-wrapped-module -opaque-pointers --dry-run --host-triple x86_64-unknown-linux-gnu \
3636
// RUN: -linker-path /usr/bin/ld -- %t.o -o a.out 2>&1 | FileCheck %s --check-prefix=CUDA
3737

3838
// CUDA: @.fatbin_image = internal constant [0 x i8] zeroinitializer, section ".nv_fatbin"

llvm/lib/Target/NVPTX/NVPTXIntrinsics.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,6 @@ def INT_NVVM_RCP_RP_F : F_MATH_1<"rcp.rp.f32 \t$dst, $src0;",
10381038

10391039
def INT_NVVM_RCP_APPROX_F : F_MATH_1<"rcp.approx.f32 \t$dst, $src0;",
10401040
Float32Regs, Float32Regs, int_nvvm_rcp_approx_f>;
1041-
def INT_NVVM_RCP_APPROX_FTZ_F : F_MATH_1<"rcp.approx.ftz.f32 \t$dst, $src0;",
1042-
Float32Regs, Float32Regs, int_nvvm_rcp_approx_ftz_f>;
10431041

10441042
def INT_NVVM_RCP_RN_D : F_MATH_1<"rcp.rn.f64 \t$dst, $src0;", Float64Regs,
10451043
Float64Regs, int_nvvm_rcp_rn_d>;

llvm/test/CodeGen/AMDGPU/GlobalISel/prelegalizer-combiner-divrem.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=amdgpu-prelegalizer-combiner -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=amdgpu-prelegalizer-combiner -opaque-pointers=1 -verify-machineinstrs -o - %s | FileCheck %s
33

44
---
55
name: test_sdiv_srem

llvm/test/CodeGen/AMDGPU/merge-flat-load-store.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -opaque-pointers=1 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
33

44
---
55
name: merge_flat_load_dword_2

llvm/test/CodeGen/AMDGPU/merge-flat-with-global-load-store.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -opaque-pointers=1 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
33

44
---
55
name: merge_flat_global_load_dword_2

llvm/test/CodeGen/AMDGPU/merge-global-load-store.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=si-load-store-opt -opaque-pointers=1 -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
33

44
---
55
name: merge_global_load_dword_2

0 commit comments

Comments
 (0)