Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions libclc/libspirv/lib/amdgcn-amdhsa/group/collectives_helpers.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,41 @@

define ptr addrspace(3) @__clc__get_group_scratch_bool() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i1], ptr addrspace(3) @__clc__group_scratch_i1, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i1
}

define ptr addrspace(3) @__clc__get_group_scratch_char() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i8], ptr addrspace(3) @__clc__group_scratch_i8, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i8
}

define ptr addrspace(3) @__clc__get_group_scratch_short() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i16], ptr addrspace(3) @__clc__group_scratch_i16, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i16
}

define i32 addrspace(3)* @__clc__get_group_scratch_int() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i32], ptr addrspace(3) @__clc__group_scratch_i32, i64 0, i64 0
ret i32 addrspace(3)* %0
ret i32 addrspace(3)* @__clc__group_scratch_i32
}

define ptr addrspace(3) @__clc__get_group_scratch_long() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i64], ptr addrspace(3) @__clc__group_scratch_i64, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i64
}

define ptr addrspace(3) @__clc__get_group_scratch_half() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i16], ptr addrspace(3) @__clc__group_scratch_i16, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i16
}

define ptr addrspace(3) @__clc__get_group_scratch_float() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i32], ptr addrspace(3) @__clc__group_scratch_i32, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i32
}

define ptr addrspace(3) @__clc__get_group_scratch_double() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i64], ptr addrspace(3) @__clc__group_scratch_i64, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i64
}

33 changes: 11 additions & 22 deletions libclc/libspirv/lib/ptx-nvidiacl/group/collectives_helpers.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,55 @@

define ptr addrspace(3) @__clc__get_group_scratch_bool() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i1], ptr addrspace(3) @__clc__group_scratch_i1, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i1
}

define ptr addrspace(3) @__clc__get_group_scratch_char() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i8], ptr addrspace(3) @__clc__group_scratch_i8, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i8
}

define ptr addrspace(3) @__clc__get_group_scratch_short() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i16], ptr addrspace(3) @__clc__group_scratch_i16, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i16
}

define i32 addrspace(3)* @__clc__get_group_scratch_int() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i32], ptr addrspace(3) @__clc__group_scratch_i32, i64 0, i64 0
ret i32 addrspace(3)* %0
ret i32 addrspace(3)* @__clc__group_scratch_i32
}

define ptr addrspace(3) @__clc__get_group_scratch_long() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i64], ptr addrspace(3) @__clc__group_scratch_i64, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i64
}

define ptr addrspace(3) @__clc__get_group_scratch_half() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i16], ptr addrspace(3) @__clc__group_scratch_i16, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i16
}

define ptr addrspace(3) @__clc__get_group_scratch_float() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i32], ptr addrspace(3) @__clc__group_scratch_i32, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i32
}

define ptr addrspace(3) @__clc__get_group_scratch_double() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i64], ptr addrspace(3) @__clc__group_scratch_i64, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i64
}

define ptr addrspace(3) @__clc__get_group_scratch_complex_half() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i32], ptr addrspace(3) @__clc__group_scratch_i32, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i32
}

define ptr addrspace(3) @__clc__get_group_scratch_complex_float() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i64], ptr addrspace(3) @__clc__group_scratch_i64, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i64
}

define ptr addrspace(3) @__clc__get_group_scratch_complex_double() nounwind alwaysinline {
entry:
%0 = getelementptr inbounds [32 x i128], ptr addrspace(3) @__clc__group_scratch_i128, i64 0, i64 0
ret ptr addrspace(3) %0
ret ptr addrspace(3) @__clc__group_scratch_i128
}