[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / Object / AMDGPU / objdump.s
blob3c3f4a11df41e88c363ff2d371a7024f8010e58e
1 // RUN: llvm-mc -arch=amdgcn -mcpu=tonga %s -mattr=-code-object-v3 -filetype=obj | llvm-objdump -disassemble -arch-name=amdgcn -mcpu=tonga - | FileCheck %s
3 .text
5 .amdgpu_hsa_kernel hello_world
6 hello_world:
7 .amd_kernel_code_t
8 .end_amd_kernel_code_t
10 s_mov_b32 m0, 0x10000
11 s_load_dwordx2 s[0:1], s[4:5], 0x8
12 s_waitcnt lgkmcnt(0)
13 s_add_u32 s0, s7, s0
14 BB0:
15 v_add_u32_e32 v1, vcc, s0, v1
16 BB1:
17 s_movk_i32 s0, 0x483
18 v_cmp_ge_i32_e32 vcc, s0, v0
19 s_and_saveexec_b64 s[0:1], vcc
20 v_lshlrev_b32_e32 v4, 2, v0
21 BB3:
22 s_cbranch_execz 21
23 s_mov_b64 s[2:3], exec
24 s_mov_b64 s[10:11], exec
25 v_mov_b32_e32 v3, v0
26 s_endpgm
28 .amdgpu_hsa_kernel hello_world2
29 hello_world2:
30 .amd_kernel_code_t
31 .end_amd_kernel_code_t
33 s_and_saveexec_b64 s[0:1], vcc
34 s_cbranch_execz 85
35 s_load_dwordx4 s[8:11], s[4:5], 0x40
36 BB5:
37 v_ashrrev_i32_e32 v77, 31, v76
38 v_lshlrev_b64 v[10:11], 2, v[76:77]
39 s_waitcnt lgkmcnt(0)
40 v_add_u32_e32 v10, vcc, s8, v10
41 v_mov_b32_e32 v6, s9
42 v_addc_u32_e32 v11, vcc, v6, v11, vcc
43 flat_load_dword v0, v[10:11]
44 v_lshlrev_b32_e32 v6, 5, v8
45 v_lshlrev_b32_e32 v7, 2, v7
46 s_endpgm
48 // CHECK: file format ELF64-amdgpu
49 // CHECK: Disassembly of section .text:
50 // CHECK: hello_world:
51 // CHECK: s_mov_b32 m0, 0x10000 // 000000000100: BEFC00FF 00010000
52 // CHECK: s_load_dwordx2 s[0:1], s[4:5], 0x8 // 000000000108: C0060002 00000008
53 // CHECK: s_waitcnt lgkmcnt(0) // 000000000110: BF8C007F
54 // CHECK: s_add_u32 s0, s7, s0 // 000000000114: 80000007
55 // CHECK: BB0:
56 // CHECK: v_add_u32_e32 v1, vcc, s0, v1 // 000000000118: 32020200
57 // CHECK: BB1:
58 // CHECK: s_movk_i32 s0, 0x483 // 00000000011C: B0000483
59 // CHECK: v_cmp_ge_i32_e32 vcc, s0, v0 // 000000000120: 7D8C0000
60 // CHECK: s_and_saveexec_b64 s[0:1], vcc // 000000000124: BE80206A
61 // CHECK: v_lshlrev_b32_e32 v4, 2, v0 // 000000000128: 24080082
62 // CHECK: BB3:
63 // CHECK: s_cbranch_execz 21 // 00000000012C: BF880015
64 // CHECK: s_mov_b64 s[2:3], exec // 000000000130: BE82017E
65 // CHECK: s_mov_b64 s[10:11], exec // 000000000134: BE8A017E
66 // CHECK: v_mov_b32_e32 v3, v0 // 000000000138: 7E060300
67 // CHECK: s_endpgm // 00000000013C: BF810000
69 // CHECK: hello_world2:
70 // CHECK: s_and_saveexec_b64 s[0:1], vcc // 000000000240: BE80206A
71 // CHECK: s_cbranch_execz 85 // 000000000244: BF880055
72 // CHECK: s_load_dwordx4 s[8:11], s[4:5], 0x40 // 000000000248: C00A0202 00000040
73 // CHECK: BB5:
74 // CHECK: v_ashrrev_i32_e32 v77, 31, v76 // 000000000250: 229A989F
75 // CHECK: v_lshlrev_b64 v[10:11], 2, v[76:77] // 000000000254: D28F000A 00029882
76 // CHECK: s_waitcnt lgkmcnt(0) // 00000000025C: BF8C007F
77 // CHECK: v_add_u32_e32 v10, vcc, s8, v10 // 000000000260: 32141408
78 // CHECK: v_mov_b32_e32 v6, s9 // 000000000264: 7E0C0209
79 // CHECK: v_addc_u32_e32 v11, vcc, v6, v11, vcc // 000000000268: 38161706
80 // CHECK: flat_load_dword v0, v[10:11] // 00000000026C: DC500000 0000000A
81 // CHECK: v_lshlrev_b32_e32 v6, 5, v8 // 000000000274: 240C1085
82 // CHECK: v_lshlrev_b32_e32 v7, 2, v7 // 000000000278: 240E0E82
83 // CHECK: s_endpgm // 00000000027C: BF810000