brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.6 KiB · 695c3ce Raw
655 lines · plain
1# REQUIRES: amdgpu-registered-target2 3# Regression test for:4#  - DW_AT_ranges not being read properly5#  - Instructions at DW_AT_high_pc of a scope incorrectly included in the scope6 7# test.hlsl8# 01 RWBuffer<float> u0 : register(u0);9# 02 RWBuffer<float> u1 : register(u1);10# 03 11# 04 [RootSignature("DescriptorTable(UAV(u0,numDescriptors=2))")]12# 05 [numthreads(64,1,1)]13# 06 void main(uint3 dtid : SV_DispatchThreadID) {14# 07   float my_var = u0[dtid.x];15# 08   [loop]16# 09   for (int i = 0; i < 10; i++) {17# 10     float my_local_var = i*2;18# 11     my_var += my_local_var;19# 12   }20# 13   u1[dtid.x] = my_var;21# 14 }22 23# RUN: llvm-mc %s --mcpu=gfx1100 -triple=amdgcn-amd-amdpal -filetype=obj -o - | \24# RUN: llvm-debuginfo-analyzer --attribute=all \25# RUN:                         --print=all \26# RUN:                         --output-sort=offset \27# RUN:                         - 2>&1 | \28# RUN: FileCheck %s29 30# Make sure these two ranges are present and point to the correct offsets31# CHECK: [005] {Range} Lines 10:9 [0x00000000b0:0x00000000c8]32# CHECK: [005] {Range} Lines 11:13 [0x00000000f4:0x0000000114]33 34# Make sure the offset 0x114 does not show up at the scope level 005 and 00435# CHECK-NOT: [0x0000000114][005]36# CHECK-NOT: [0x0000000114][004]37# CHECK: [0x0000000114][003]38 39	.file	0 "test.hlsl"40	.text41	.globl	_amdgpu_cs_main42	.p2align	843	.type	_amdgpu_cs_main,@function44_amdgpu_cs_main:45.Lfunc_begin0:46	.loc	0 6 047	.cfi_sections .debug_frame48	.cfi_startproc49	v_writelane_b32 v1, s4, 050	s_mov_b32 s0, s251	s_mov_b32 s4, s152	v_readlane_b32 s1, v1, 053	s_mov_b32 s8, s054.Ltmp0:55	.loc	0 6 24 prologue_end56	s_getpc_b64 s[2:3]57	s_mov_b32 s1, 0x3ff58	v_and_b32_e64 v0, v0, s159	s_mov_b32 s1, 660	v_lshl_add_u32 v0, s0, s1, v061	scratch_store_b32 off, v0, off offset:462.Ltmp1:63	.loc	0 0 24 is_stmt 064	s_mov_b32 s1, -165	s_mov_b32 s0, 066	s_mov_b32 s6, s067	s_mov_b32 s7, s168	.loc	0 7 25 is_stmt 169	s_and_b64 s[2:3], s[2:3], s[6:7]70	s_mov_b32 s1, 071	s_mov_b32 s5, s172	s_or_b64 s[2:3], s[2:3], s[4:5]73	v_writelane_b32 v1, s2, 174	v_writelane_b32 v1, s3, 275.Ltmp2:76	s_load_b128 s[4:7], s[2:3], 0x077	s_waitcnt lgkmcnt(0)78	buffer_load_format_x v0, v0, s[4:7], s0 idxen79.Ltmp3:80	.loc	0 9 1081	s_waitcnt vmcnt(0)82	scratch_store_b32 off, v0, off83.Ltmp4:84	v_writelane_b32 v1, s0, 385.Ltmp5:86.LBB0_1:87	.loc	0 0 10 is_stmt 088	v_readlane_b32 s0, v1, 389	scratch_load_b32 v0, off, off90.Ltmp6:91	s_mov_b32 s1, 192.Ltmp7:93	.loc	0 10 34 is_stmt 194	s_lshl_b32 s2, s0, s195	.loc	0 10 33 is_stmt 096	v_cvt_f32_u32_e64 v2, s297.Ltmp8:98	.loc	0 11 19 is_stmt 199	s_waitcnt vmcnt(0)100	v_add_f32_e64 v0, v0, v2101.Ltmp9:102	.loc	0 9 35103	s_add_i32 s0, s0, s1104.Ltmp10:105	.loc	0 0 35 is_stmt 0106	s_mov_b32 s1, 10107	.loc	0 9 28108	s_cmp_lg_u32 s0, s1109	v_mov_b32_e32 v2, v0110.Ltmp11:111	.loc	0 0 28112	scratch_store_b32 off, v2, off113	v_writelane_b32 v1, s0, 3114.Ltmp12:115	.loc	0 9 10116	scratch_store_b32 off, v0, off offset:8117.Ltmp13:118	s_cbranch_scc1 .LBB0_1119.Ltmp14:120	.loc	0 11 19 is_stmt 1121	v_readlane_b32 s0, v1, 1122.Ltmp15:123	v_readlane_b32 s1, v1, 2124	scratch_load_b32 v0, off, off offset:4125	scratch_load_b32 v6, off, off offset:8126.Ltmp16:127	.loc	0 13 21128	s_waitcnt vmcnt(0)129	v_mov_b32_e32 v2, v6130	v_mov_b32_e32 v3, v6131	v_mov_b32_e32 v4, v6132	v_mov_b32_e32 v5, v6133	s_load_b128 s[0:3], s[0:1], 0x20134	s_mov_b32 s4, 0135	s_waitcnt lgkmcnt(0)136	buffer_store_format_xyzw v[2:5], v0, s[0:3], s4 idxen137	.loc	0 14 8138	s_endpgm139.Ltmp17:140.Lfunc_end0:141	.size	_amdgpu_cs_main, .Lfunc_end0-_amdgpu_cs_main142	.cfi_endproc143 144	.set _amdgpu_cs_main.num_vgpr, 7145	.set _amdgpu_cs_main.num_agpr, 0146	.set _amdgpu_cs_main.numbered_sgpr, 11147	.set _amdgpu_cs_main.num_named_barrier, 0148	.set _amdgpu_cs_main.private_seg_size, 16149	.set _amdgpu_cs_main.uses_vcc, 0150	.set _amdgpu_cs_main.uses_flat_scratch, 0151	.set _amdgpu_cs_main.has_dyn_sized_stack, 0152	.set _amdgpu_cs_main.has_recursion, 0153	.set _amdgpu_cs_main.has_indirect_call, 0154	.set _amdgpu_cs_main.num_vgpr_rank_sum, 0155	.p2alignl 7, 3214868480156	.fill 96, 4, 3214868480157	.section	.AMDGPU.gpr_maximums,"",@progbits158	.set amdgpu.max_num_vgpr, 0159	.set amdgpu.max_num_agpr, 0160	.set amdgpu.max_num_sgpr, 0161	.text162	.section	.debug_loclists,"",@progbits163	.long	.Ldebug_list_header_end0-.Ldebug_list_header_start0164.Ldebug_list_header_start0:165	.short	5166	.byte	8167	.byte	0168	.long	4169.Lloclists_table_base0:170	.long	.Ldebug_loc0-.Lloclists_table_base0171	.long	.Ldebug_loc1-.Lloclists_table_base0172	.long	.Ldebug_loc2-.Lloclists_table_base0173	.long	.Ldebug_loc3-.Lloclists_table_base0174.Ldebug_loc0:175	.byte	4176	.uleb128 .Ltmp1-.Lfunc_begin0177	.uleb128 .Ltmp3-.Lfunc_begin0178	.byte	5179	.byte	144180	.byte	128181	.byte	20182	.byte	147183	.byte	4184	.byte	0185.Ldebug_loc1:186	.byte	4187	.uleb128 .Ltmp3-.Lfunc_begin0188	.uleb128 .Ltmp4-.Lfunc_begin0189	.byte	3190	.byte	144191	.byte	128192	.byte	20193	.byte	4194	.uleb128 .Ltmp6-.Lfunc_begin0195	.uleb128 .Ltmp13-.Lfunc_begin0196	.byte	3197	.byte	144198	.byte	128199	.byte	20200	.byte	4201	.uleb128 .Ltmp16-.Lfunc_begin0202	.uleb128 .Lfunc_end0-.Lfunc_begin0203	.byte	3204	.byte	144205	.byte	134206	.byte	20207	.byte	0208.Ldebug_loc2:209	.byte	4210	.uleb128 .Ltmp2-.Lfunc_begin0211	.uleb128 .Ltmp5-.Lfunc_begin0212	.byte	3213	.byte	17214	.byte	0215	.byte	159216	.byte	4217	.uleb128 .Ltmp6-.Lfunc_begin0218	.uleb128 .Ltmp15-.Lfunc_begin0219	.byte	2220	.byte	144221	.byte	32222	.byte	0223.Ldebug_loc3:224	.byte	4225	.uleb128 .Ltmp8-.Lfunc_begin0226	.uleb128 .Ltmp11-.Lfunc_begin0227	.byte	3228	.byte	144229	.byte	130230	.byte	20231	.byte	0232.Ldebug_list_header_end0:233	.section	.debug_abbrev,"",@progbits234	.byte	1235	.byte	17236	.byte	1237	.byte	37238	.byte	37239	.byte	19240	.byte	5241	.byte	3242	.byte	37243	.byte	114244	.byte	23245	.byte	16246	.byte	23247	.byte	17248	.byte	27249	.byte	18250	.byte	6251	.byte	115252	.byte	23253	.byte	116254	.byte	23255	.ascii	"\214\001"256	.byte	23257	.byte	0258	.byte	0259	.byte	2260	.byte	52261	.byte	0262	.byte	3263	.byte	37264	.byte	73265	.byte	19266	.byte	63267	.byte	25268	.byte	58269	.byte	11270	.byte	59271	.byte	11272	.byte	110273	.byte	37274	.byte	0275	.byte	0276	.byte	3277	.byte	2278	.byte	1279	.byte	3280	.byte	37281	.byte	11282	.byte	11283	.byte	58284	.byte	11285	.byte	59286	.byte	11287	.ascii	"\210\001"288	.byte	15289	.byte	0290	.byte	0291	.byte	4292	.byte	47293	.byte	0294	.byte	73295	.byte	19296	.byte	3297	.byte	37298	.byte	0299	.byte	0300	.byte	5301	.byte	36302	.byte	0303	.byte	3304	.byte	37305	.byte	62306	.byte	11307	.byte	11308	.byte	11309	.byte	0310	.byte	0311	.byte	6312	.byte	46313	.byte	1314	.byte	17315	.byte	27316	.byte	18317	.byte	6318	.byte	3319	.byte	37320	.byte	58321	.byte	11322	.byte	59323	.byte	11324	.byte	63325	.byte	25326	.byte	0327	.byte	0328	.byte	7329	.byte	5330	.byte	0331	.byte	2332	.byte	34333	.byte	3334	.byte	37335	.byte	58336	.byte	11337	.byte	59338	.byte	11339	.byte	73340	.byte	19341	.byte	0342	.byte	0343	.byte	8344	.byte	52345	.byte	0346	.byte	2347	.byte	34348	.byte	3349	.byte	37350	.byte	58351	.byte	11352	.byte	59353	.byte	11354	.byte	73355	.byte	19356	.byte	0357	.byte	0358	.byte	9359	.byte	11360	.byte	1361	.byte	17362	.byte	27363	.byte	18364	.byte	6365	.byte	0366	.byte	0367	.byte	10368	.byte	11369	.byte	1370	.byte	85371	.byte	35372	.byte	0373	.byte	0374	.byte	11375	.byte	22376	.byte	0377	.byte	73378	.byte	19379	.byte	3380	.byte	37381	.byte	0382	.byte	0383	.byte	12384	.byte	2385	.byte	1386	.byte	3387	.byte	37388	.byte	11389	.byte	11390	.ascii	"\210\001"391	.byte	15392	.byte	0393	.byte	0394	.byte	13395	.byte	48396	.byte	0397	.byte	73398	.byte	19399	.byte	3400	.byte	37401	.byte	28402	.byte	13403	.byte	0404	.byte	0405	.byte	14406	.byte	13407	.byte	0408	.byte	3409	.byte	37410	.byte	73411	.byte	19412	.ascii	"\210\001"413	.byte	15414	.byte	56415	.byte	11416	.byte	50417	.byte	11418	.byte	0419	.byte	0420	.byte	0421	.section	.debug_info,"",@progbits422.Lcu_begin0:423	.long	.Ldebug_info_end0-.Ldebug_info_start0424.Ldebug_info_start0:425	.short	5426	.byte	1427	.byte	8428	.long	.debug_abbrev429	.byte	1430	.byte	0431	.short	4432	.byte	1433	.long	.Lstr_offsets_base0434	.long	.Lline_table_start0435	.byte	0436	.long	.Lfunc_end0-.Lfunc_begin0437	.long	.Laddr_table_base0438	.long	.Lrnglists_table_base0439	.long	.Lloclists_table_base0440	.byte	2441	.byte	2442	.long	51443 444	.byte	0445	.byte	1446	.byte	6447	.byte	3448	.byte	5449	.byte	4450	.byte	0451	.byte	1452	.byte	4453	.byte	4454	.long	64455	.byte	4456	.byte	0457	.byte	5458	.byte	3459	.byte	4460	.byte	4461	.byte	2462	.byte	7463	.long	51464 465	.byte	0466	.byte	2467	.byte	8468	.byte	6469	.byte	0470	.long	.Lfunc_end0-.Lfunc_begin0471	.byte	9472	.byte	0473	.byte	6474 475	.byte	7476	.byte	0477	.byte	10478	.byte	0479	.byte	6480	.long	133481	.byte	8482	.byte	1483	.byte	19484	.byte	0485	.byte	7486	.long	64487	.byte	9488	.byte	1489	.long	.Ltmp16-.Ltmp3490	.byte	8491	.byte	2492	.byte	20493	.byte	0494	.byte	9495	.long	188496	.byte	10497	.byte	0498	.byte	8499	.byte	3500	.byte	21501	.byte	0502	.byte	10503	.long	64504	.byte	0505	.byte	0506	.byte	0507	.byte	11508	.long	139509	.byte	18510	.byte	12511	.byte	17512	.byte	12513	.byte	4514	.byte	4515	.long	184516	.byte	4517	.byte	13518	.long	188519	.byte	13520	.byte	3521	.byte	14522	.byte	14523	.long	184524	.byte	4525	.byte	0526	.byte	1527	.byte	14528	.byte	15529	.long	184530	.byte	4531	.byte	4532	.byte	1533	.byte	14534	.byte	16535	.long	184536	.byte	4537	.byte	8538	.byte	1539	.byte	0540	.byte	5541	.byte	11542	.byte	7543	.byte	4544	.byte	5545	.byte	12546	.byte	5547	.byte	4548	.byte	0549.Ldebug_info_end0:550	.section	.debug_rnglists,"",@progbits551	.long	.Ldebug_list_header_end1-.Ldebug_list_header_start1552.Ldebug_list_header_start1:553	.short	5554	.byte	8555	.byte	0556	.long	1557.Lrnglists_table_base0:558	.long	.Ldebug_ranges0-.Lrnglists_table_base0559.Ldebug_ranges0:560	.byte	4561	.uleb128 .Ltmp7-.Lfunc_begin0562	.uleb128 .Ltmp9-.Lfunc_begin0563	.byte	4564	.uleb128 .Ltmp14-.Lfunc_begin0565	.uleb128 .Ltmp16-.Lfunc_begin0566	.byte	0567.Ldebug_list_header_end1:568	.section	.debug_str_offsets,"",@progbits569	.long	92570	.short	5571	.short	0572.Lstr_offsets_base0:573	.section	.debug_str,"MS",@progbits,1574.Linfo_string0:575	.asciz	"dxc"576.Linfo_string1:577	.asciz	"test.hlsl"578.Linfo_string2:579	.asciz	"u0"580.Linfo_string3:581	.asciz	"RWBuffer<float>"582.Linfo_string4:583	.asciz	"float"584.Linfo_string5:585	.asciz	"element"586.Linfo_string6:587	.asciz	"?u0@@3V?$RWBuffer@M@@A"588.Linfo_string7:589	.asciz	"u1"590.Linfo_string8:591	.asciz	"?u1@@3V?$RWBuffer@M@@A"592.Linfo_string9:593	.asciz	"main"594.Linfo_string10:595	.asciz	"dtid"596.Linfo_string11:597	.asciz	"uint3"598.Linfo_string12:599	.asciz	"vector<unsigned int, 3>"600.Linfo_string13:601	.asciz	"unsigned int"602.Linfo_string14:603	.asciz	"int"604.Linfo_string15:605	.asciz	"element_count"606.Linfo_string16:607	.asciz	"x"608.Linfo_string17:609	.asciz	"y"610.Linfo_string18:611	.asciz	"z"612.Linfo_string19:613	.asciz	"my_var"614.Linfo_string20:615	.asciz	"i"616.Linfo_string21:617	.asciz	"my_local_var"618	.section	.debug_str_offsets,"",@progbits619	.long	.Linfo_string0620	.long	.Linfo_string1621	.long	.Linfo_string2622	.long	.Linfo_string4623	.long	.Linfo_string5624	.long	.Linfo_string3625	.long	.Linfo_string6626	.long	.Linfo_string7627	.long	.Linfo_string8628	.long	.Linfo_string9629	.long	.Linfo_string10630	.long	.Linfo_string13631	.long	.Linfo_string14632	.long	.Linfo_string15633	.long	.Linfo_string16634	.long	.Linfo_string17635	.long	.Linfo_string18636	.long	.Linfo_string12637	.long	.Linfo_string11638	.long	.Linfo_string19639	.long	.Linfo_string20640	.long	.Linfo_string21641	.section	.debug_addr,"",@progbits642	.long	.Ldebug_addr_end0-.Ldebug_addr_start0643.Ldebug_addr_start0:644	.short	5645	.byte	8646	.byte	0647.Laddr_table_base0:648	.quad	.Lfunc_begin0649	.quad	.Ltmp3650.Ldebug_addr_end0:651	.section	.debug_names,"",@progbits652	.section	".note.GNU-stack","",@progbits653	.section	.debug_line,"",@progbits654.Lline_table_start0:655