2,161 changes: 1,744 additions & 417 deletions llvm/test/CodeGen/AMDGPU/flat_atomics_i32_system.ll

Large diffs are not rendered by default.

2,268 changes: 1,875 additions & 393 deletions llvm/test/CodeGen/AMDGPU/flat_atomics_i64_system.ll

Large diffs are not rendered by default.

640 changes: 640 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global-atomics-fp.ll

Large diffs are not rendered by default.

2,381 changes: 1,918 additions & 463 deletions llvm/test/CodeGen/AMDGPU/global_atomics_i32_system.ll

Large diffs are not rendered by default.

2,328 changes: 1,961 additions & 367 deletions llvm/test/CodeGen/AMDGPU/global_atomics_i64_system.ll

Large diffs are not rendered by default.

741 changes: 741 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fadd.ll

Large diffs are not rendered by default.

672 changes: 672 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmax.ll

Large diffs are not rendered by default.

671 changes: 671 additions & 0 deletions llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll

Large diffs are not rendered by default.

710 changes: 710 additions & 0 deletions llvm/test/CodeGen/AMDGPU/local-atomics-fp.ll

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ entry:
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind }
;.
; CHECK: [[META0]] = !{}
; CHECK: [[PROF1]] = !{!"branch_weights", i32 1, i32 100000}
; CHECK: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575}
;.
4 changes: 2 additions & 2 deletions llvm/test/Instrumentation/SanitizerCoverage/stack-depth.ll
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ define weak_odr hidden ptr @_ZTW21__sancov_lowest_stack() {
; L3: attributes #[[ATTR2]] = { nomerge }
;.
; L1: [[META0]] = !{}
; L1: [[PROF1]] = !{!"branch_weights", i32 1, i32 100000}
; L1: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575}
;.
; L3: [[META0]] = !{}
; L3: [[PROF1]] = !{!"branch_weights", i32 1, i32 100000}
; L3: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575}
;.
3,717 changes: 3,717 additions & 0 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f32-system.ll

Large diffs are not rendered by default.

1,685 changes: 1,685 additions & 0 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-f64-system.ll

Large diffs are not rendered by default.

828 changes: 828 additions & 0 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i32-system.ll

Large diffs are not rendered by default.

828 changes: 828 additions & 0 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i64-system.ll

Large diffs are not rendered by default.

2,209 changes: 2,200 additions & 9 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-rmw-fadd.ll

Large diffs are not rendered by default.

Large diffs are not rendered by default.

859 changes: 859 additions & 0 deletions llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-v2f16-system.ll

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ define i32 @test_atomicrmw_xor_0_global_system(ptr addrspace(1) %ptr) {
}


define i32 @test_atomicrmw_or_0_global_system__metadata(ptr addrspace(1) %ptr) {
; CHECK-LABEL: define i32 @test_atomicrmw_or_0_global_system__metadata(
; CHECK-SAME: ptr addrspace(1) [[PTR:%.*]]) {
; CHECK-NEXT: [[RES:%.*]] = atomicrmw add ptr addrspace(1) [[PTR]], i32 0 seq_cst, align 4, !amdgpu.no.fine.grained.memory [[META0]], !amdgpu.no.remote.memory.access [[META0]]
; CHECK-NEXT: ret i32 [[RES]]
;
%res = atomicrmw or ptr addrspace(1) %ptr, i32 0 seq_cst, !amdgpu.no.fine.grained.memory !0, !amdgpu.no.remote.memory.access !0
ret i32 %res
}

!0 = !{}
;.
; CHECK: [[META0]] = !{}
Expand Down
10 changes: 10 additions & 0 deletions llvm/test/Transforms/InferAddressSpaces/AMDGPU/basic.ll
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,14 @@ entry:
ret void
}

; CHECK-LABEL: @atomicrmw_add_global_to_flat_preserve_amdgpu_md(
; CHECK-NEXT: %ret = atomicrmw add ptr addrspace(1) %global.ptr, i32 %y seq_cst, align 4, !amdgpu.no.fine.grained.memory !0, !amdgpu.no.remote.memory.access !0
define i32 @atomicrmw_add_global_to_flat_preserve_amdgpu_md(ptr addrspace(1) %global.ptr, i32 %y) #0 {
%cast = addrspacecast ptr addrspace(1) %global.ptr to ptr
%ret = atomicrmw add ptr %cast, i32 %y seq_cst, align 4, !amdgpu.no.fine.grained.memory !0, !amdgpu.no.remote.memory.access !0
ret i32 %ret
}

attributes #0 = { nounwind }

!0 = !{}
30 changes: 30 additions & 0 deletions llvm/test/Transforms/Inline/AMDGPU/inline-atomicrmw-md-preserve.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes=inline < %s | FileCheck %s
; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes='cgscc(inline)' < %s | FileCheck %s

; Ensure that custom metadata survives inlining

define i32 @atomic_xor(ptr addrspace(1) %ptr, i32 %val) {
; CHECK-LABEL: define i32 @atomic_xor(
; CHECK-SAME: ptr addrspace(1) [[PTR:%.*]], i32 [[VAL:%.*]]) {
; CHECK-NEXT: [[RES:%.*]] = atomicrmw xor ptr addrspace(1) [[PTR]], i32 [[VAL]] monotonic, align 4, !amdgpu.no.fine.grained.memory [[META0:![0-9]+]], !amdgpu.no.remote.memory.access [[META0]]
; CHECK-NEXT: ret i32 [[RES]]
;
%res = atomicrmw xor ptr addrspace(1) %ptr, i32 %val monotonic, !amdgpu.no.fine.grained.memory !0, !amdgpu.no.remote.memory.access !0
ret i32 %res
}

define i32 @caller(ptr addrspace(1) %ptr, i32 %val) {
; CHECK-LABEL: define i32 @caller(
; CHECK-SAME: ptr addrspace(1) [[PTR:%.*]], i32 [[VAL:%.*]]) {
; CHECK-NEXT: [[RES_I:%.*]] = atomicrmw xor ptr addrspace(1) [[PTR]], i32 [[VAL]] monotonic, align 4, !amdgpu.no.fine.grained.memory [[META0]], !amdgpu.no.remote.memory.access [[META0]]
; CHECK-NEXT: ret i32 [[RES_I]]
;
%res = call i32 @atomic_xor(ptr addrspace(1) %ptr, i32 %val)
ret i32 %res
}

!0 = !{}
;.
; CHECK: [[META0]] = !{}
;.
1 change: 0 additions & 1 deletion llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ static void EmitRISCVTargetDef(RecordKeeper &RK, raw_ostream &OS) {
OS << "#ifndef TUNE_PROC\n"
<< "#define TUNE_PROC(ENUM, NAME)\n"
<< "#endif\n\n";
OS << "TUNE_PROC(GENERIC, \"generic\")\n";

for (const Record *Rec :
RK.getAllDerivedDefinitions("RISCVTuneProcessorModel")) {
Expand Down