File: sopk-no-literal.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (24 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
; REQUIRES: asserts
; RUN: llc -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -debug-only=branch-relaxation -verify-machineinstrs < %s 2>&1 | FileCheck --check-prefix=GFX10 %s

; GFX10: Basic blocks after relaxation
; GFX10: %bb.0	offset=00000000	size=0x1c

; Each instruction in the following kernel is 4 bytes in size,
; except s_load_b32 which is 8 bytes in size. Hence, 0x1c bytes in total.
define amdgpu_kernel void @test_sopk_size(i32 %var.mode) {
; GFX10-LABEL: test_sopk_size:
; GFX10:  ; %bb.0:
; GFX10:    s_load_b32 s0, s[4:5], 0x0
; GFX10:    s_mov_b32 s1, 3
; GFX10:    s_setreg_b32 hwreg(HW_REG_MODE, 0, 2), s1
; GFX10:    s_waitcnt lgkmcnt(0)
; GFX10:    s_setreg_b32 hwreg(HW_REG_MODE, 0, 3), s0
; GFX10:    s_endpgm
  call void @llvm.amdgcn.s.setreg(i32 2049, i32 3)
  call void @llvm.amdgcn.s.setreg(i32 4097, i32 %var.mode)
  call void asm sideeffect "", ""()
  ret void
}

declare void @llvm.amdgcn.s.setreg(i32 immarg, i32)