Skip to content

Commit bc889e7

Browse files
[Metal] Add attributes for some simd permute intrinsics (#766)
* Add ballot voting attributes for Metal backend * Add the other simd intrinsics * Add even more intrinsics --------- Co-authored-by: Christian Guinard <28689358+christiangnrd@users.noreply.github.com>
1 parent 61e84b0 commit bc889e7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/metal.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,11 @@ function annotate_air_intrinsics!(@nospecialize(job::CompilerJob), mod::LLVM.Mod
10411041
add_attributes("convergent", "mustprogress", "nofree", "nounwind", "readonly", "willreturn")
10421042
elseif match(r"air.simdgroup_matrix_8x8_store", fn) !== nothing
10431043
add_attributes("convergent", "mustprogress", "nounwind", "willreturn", "writeonly")
1044+
1045+
# simd permute
1046+
elseif match(r"air.simd_(ballot|all|vote_all|any|vote_any|shuffle|shuffle_xor|shuffle_down|\
1047+
shuffle_up|shuffle_and_fill_down|shuffle_and_fill_up)", fn) !== nothing
1048+
add_attributes("convergent", "mustprogress", "nounwind", "willreturn")
10441049
end
10451050
end
10461051

0 commit comments

Comments
 (0)