323 lines
19 KiB
LLVM
323 lines
19 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -mtriple=amdgcn-- -mcpu=gfx906 -amdgpu-atomic-optimizer-strategy=Iterative -passes='amdgpu-atomic-optimizer,verify<domtree>' %s | FileCheck -check-prefix=IR-ITERATIVE %s
|
|
; RUN: opt -S -mtriple=amdgcn-- -mcpu=gfx906 -amdgpu-atomic-optimizer-strategy=DPP -passes='amdgpu-atomic-optimizer,verify<domtree>' %s | FileCheck -check-prefix=IR-DPP %s
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_uni_value_agent_scope_unsafe(ptr addrspace(1) inreg %ptr, float inreg %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_uni_value_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_uni_value_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_div_value_scope_agent_scope_unsafe(ptr addrspace(1) inreg %ptr, float %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_div_value_scope_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_div_value_scope_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_uni_value_one_as_scope_unsafe_structfp(ptr addrspace(1) inreg %ptr, float inreg %val) #1 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_uni_value_one_as_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_uni_value_one_as_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("one-as") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_div_value_one_as_scope_unsafe_structfp(ptr addrspace(1) inreg %ptr, float %val) #1 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_div_value_one_as_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_div_value_one_as_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("one-as") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fsub_uni_address_uni_value_agent_scope_strictfp(ptr addrspace(1) inreg %ptr, float inreg %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fsub_uni_address_uni_value_agent_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fsub_uni_address_uni_value_agent_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
|
|
define amdgpu_ps float @global_atomic_fsub_uni_address_div_value_agent_scope_strictfp(ptr addrspace(1) inreg %ptr, float %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fsub_uni_address_div_value_agent_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fsub ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fsub_uni_address_div_value_agent_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fsub ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fsub ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe(ptr addrspace(1) inreg %ptr, float inreg %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmin_uni_address_uni_value_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmin ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmin_uni_address_div_value_agent_scope_unsafe(ptr addrspace(1) inreg %ptr, float %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmin_uni_address_div_value_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmin_uni_address_div_value_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmin ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmax_uni_address_uni_value_agent_scope_unsafe_structfp(ptr addrspace(1) inreg %ptr, float inreg %val) #1{
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmax_uni_address_uni_value_agent_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmax_uni_address_uni_value_agent_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmax ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmax_uni_address_div_value_agent_scope_unsafe_structfp(ptr addrspace(1) inreg %ptr, float %val) #1{
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmax_uni_address_div_value_agent_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmax_uni_address_div_value_agent_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmax ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_uni_value_system_scope_strictfp(ptr addrspace(1) inreg %ptr, float inreg %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_uni_value_system_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_uni_value_system_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_uni_address_div_value_system_scope_strictfp(ptr addrspace(1) inreg %ptr, float %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_uni_address_div_value_system_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_uni_address_div_value_system_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_uni_value_agent_scope_unsafe(ptr addrspace(1) %ptr, float inreg %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_uni_value_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_uni_value_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_div_value_agent_scope_unsafe(ptr addrspace(1) %ptr, float %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_div_value_agent_scope_unsafe(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_div_value_agent_scope_unsafe(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_uni_value_one_as_scope_unsafe_structfp(ptr addrspace(1) %ptr, float inreg %val) #1 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_uni_value_one_as_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_uni_value_one_as_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("one-as") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_div_value_one_as_scope_unsafe_structfp(ptr addrspace(1) %ptr, float %val) #1 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_div_value_one_as_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_div_value_one_as_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("one-as") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("one-as") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fsub_div_address_uni_value_agent_scope_strictfp(ptr addrspace(1) %ptr, float inreg %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fsub_div_address_uni_value_agent_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fsub_div_address_uni_value_agent_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
|
|
define amdgpu_ps float @global_atomic_fsub_div_address_div_value_agent_scope_strictfp(ptr addrspace(1) %ptr, float %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fsub_div_address_div_value_agent_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fsub ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fsub_div_address_div_value_agent_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fsub ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fsub ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmin_div_address_uni_value_agent_scope(ptr addrspace(1) %ptr, float inreg %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmin_div_address_uni_value_agent_scope(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmin_div_address_uni_value_agent_scope(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmin ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmin_div_address_div_value_agent_scope(ptr addrspace(1) %ptr, float %val) #0 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmin_div_address_div_value_agent_scope(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmin_div_address_div_value_agent_scope(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmin ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmin ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmax_div_address_uni_value_agent_scope_unsafe_structfp(ptr addrspace(1) %ptr, float inreg %val) #1{
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmax_div_address_uni_value_agent_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmax_div_address_uni_value_agent_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmax ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fmax_div_address_div_value_agent_scope_unsafe_structfp(ptr addrspace(1) %ptr, float %val) #1{
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fmax_div_address_div_value_agent_scope_unsafe_structfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fmax_div_address_div_value_agent_scope_unsafe_structfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fmax ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] syncscope("agent") monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fmax ptr addrspace(1) %ptr, float %val syncscope("agent") monotonic
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_uni_value_system_scope_strictfp(ptr addrspace(1) %ptr, float inreg %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_uni_value_system_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_uni_value_system_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
define amdgpu_ps float @global_atomic_fadd_div_address_div_value_system_scope_strictfp(ptr addrspace(1) %ptr, float %val) #2 {
|
|
; IR-ITERATIVE-LABEL: @global_atomic_fadd_div_address_div_value_system_scope_strictfp(
|
|
; IR-ITERATIVE-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-ITERATIVE-NEXT: ret float [[RESULT]]
|
|
;
|
|
; IR-DPP-LABEL: @global_atomic_fadd_div_address_div_value_system_scope_strictfp(
|
|
; IR-DPP-NEXT: [[RESULT:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR:%.*]], float [[VAL:%.*]] monotonic, align 4
|
|
; IR-DPP-NEXT: ret float [[RESULT]]
|
|
;
|
|
%result = atomicrmw fadd ptr addrspace(1) %ptr, float %val monotonic, align 4
|
|
ret float %result
|
|
}
|
|
|
|
attributes #0 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" "amdgpu-unsafe-fp-atomics"="true" }
|
|
attributes #1 = { strictfp "denormal-fp-math-f32"="preserve-sign,preserve-sign" "amdgpu-unsafe-fp-atomics"="true" }
|
|
attributes #2 = { strictfp }
|