File: subgroup_broadcast_lid_uniformity.ll

package info (click to toggle)
intel-graphics-compiler2 2.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 106,644 kB
  • sloc: cpp: 805,640; lisp: 287,672; ansic: 16,414; python: 3,952; yacc: 2,588; lex: 1,666; pascal: 313; sh: 186; makefile: 35
file content (31 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2024 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================
;

; REQUIRES: regkeys
; RUN: igc_opt --typed-pointers --igc-pressure-printer -S --disable-output --regkey=RegPressureVerbocity=1 < %s 2>&1 | FileCheck %s

; This test verifies if the WIAnalysis correctly treats localID argument of sub_group_broadcast
; as non-uniform if it comes directly from a load instruction.

; Function Attrs: convergent nounwind
define spir_func void @test_local_id_from_load(i32 %val, i32 %slid, i32 addrspace(1)* %dst, i64 %gid) {
entry:
  %a = alloca i32, align 4
  store i32 %slid, i32* %a, align 4
  %localID = load i32, i32* %a, align 4
  %simdBroadcast = call i32 @llvm.genx.GenISA.WaveBroadcast.i32(i32 %val, i32 %localID, i32 0)
  %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %dst, i64 %gid
  store i32 %simdBroadcast, i32 addrspace(1)* %arrayidx, align 4
  ret void
}

; CHECK: block: entry function: test_local_id_from_load
; CHECK: N: {{.*}}  %localID = load i32, i32* %a, align 4

declare i32 @llvm.genx.GenISA.WaveBroadcast.i32(i32, i32, i32)