brintos

brintos / llvm-project-archived public Read only

0
0
Text · 47.0 KiB · 683887b Raw
1111 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=amdgcn -mcpu=gfx90a < %s | FileCheck -enable-var-scope --check-prefix=GCN %s3 4; Make sure the register class requirments of ds_write2_* instructions5; are properly respected when they can use AGPRs. Both data operands6; together must be VGPR or AGPR.7 8;---------------------------------------------------------------------9; b32 cases10;---------------------------------------------------------------------11 12; Test a pattern that can form ds_write_b32 with data in AGPRs13define void @ds_write2_b32_a_a(ptr addrspace(3) %lds) #0 {14; GCN-LABEL: ds_write2_b32_a_a:15; GCN:       ; %bb.0:16; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)17; GCN-NEXT:    ;;#ASMSTART18; GCN-NEXT:    ; def a019; GCN-NEXT:    ;;#ASMEND20; GCN-NEXT:    ;;#ASMSTART21; GCN-NEXT:    ; def a122; GCN-NEXT:    ;;#ASMEND23; GCN-NEXT:    ds_write_b32 v0, a0 offset:4024; GCN-NEXT:    ds_write_b32 v0, a1 offset:9625; GCN-NEXT:    s_waitcnt lgkmcnt(0)26; GCN-NEXT:    s_setpc_b64 s[30:31]27  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 1028  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 2429  %a0 = call i32 asm "; def $0", "=a"()30  %a1 = call i32 asm "; def $0", "=a"()31  store i32 %a0, ptr addrspace(3) %gep.032  store i32 %a1, ptr addrspace(3) %gep.133  ret void34}35 36define void @ds_write2_b32_a_v(ptr addrspace(3) %lds) #0 {37; GCN-LABEL: ds_write2_b32_a_v:38; GCN:       ; %bb.0:39; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)40; GCN-NEXT:    ;;#ASMSTART41; GCN-NEXT:    ; def a042; GCN-NEXT:    ;;#ASMEND43; GCN-NEXT:    ;;#ASMSTART44; GCN-NEXT:    ; def v145; GCN-NEXT:    ;;#ASMEND46; GCN-NEXT:    ds_write_b32 v0, a0 offset:4047; GCN-NEXT:    ds_write_b32 v0, v1 offset:9648; GCN-NEXT:    s_waitcnt lgkmcnt(0)49; GCN-NEXT:    s_setpc_b64 s[30:31]50  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 1051  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 2452  %a0 = call i32 asm "; def $0", "=a"()53  %v0 = call i32 asm "; def $0", "=v"()54  store i32 %a0, ptr addrspace(3) %gep.055  store i32 %v0, ptr addrspace(3) %gep.156  ret void57}58 59define void @ds_write2_b32_v_a(ptr addrspace(3) %lds) #0 {60; GCN-LABEL: ds_write2_b32_v_a:61; GCN:       ; %bb.0:62; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)63; GCN-NEXT:    ;;#ASMSTART64; GCN-NEXT:    ; def a065; GCN-NEXT:    ;;#ASMEND66; GCN-NEXT:    ;;#ASMSTART67; GCN-NEXT:    ; def v168; GCN-NEXT:    ;;#ASMEND69; GCN-NEXT:    ds_write_b32 v0, a0 offset:4070; GCN-NEXT:    ds_write_b32 v0, v1 offset:9671; GCN-NEXT:    s_waitcnt lgkmcnt(0)72; GCN-NEXT:    s_setpc_b64 s[30:31]73  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 1074  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 2475  %v0 = call i32 asm "; def $0", "=v"()76  %a0 = call i32 asm "; def $0", "=a"()77  store i32 %a0, ptr addrspace(3) %gep.078  store i32 %v0, ptr addrspace(3) %gep.179  ret void80}81 82define void @ds_write2_b32_v_v(ptr addrspace(3) %lds) #0 {83; GCN-LABEL: ds_write2_b32_v_v:84; GCN:       ; %bb.0:85; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)86; GCN-NEXT:    ;;#ASMSTART87; GCN-NEXT:    ; def v188; GCN-NEXT:    ;;#ASMEND89; GCN-NEXT:    ;;#ASMSTART90; GCN-NEXT:    ; def v291; GCN-NEXT:    ;;#ASMEND92; GCN-NEXT:    ds_write2_b32 v0, v1, v2 offset0:10 offset1:2493; GCN-NEXT:    s_waitcnt lgkmcnt(0)94; GCN-NEXT:    s_setpc_b64 s[30:31]95  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 1096  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 2497  %v0 = call i32 asm "; def $0", "=v"()98  %v1 = call i32 asm "; def $0", "=v"()99  store i32 %v0, ptr addrspace(3) %gep.0100  store i32 %v1, ptr addrspace(3) %gep.1101  ret void102}103 104define void @ds_write2_b32_av_av(ptr addrspace(3) %lds) #0 {105; GCN-LABEL: ds_write2_b32_av_av:106; GCN:       ; %bb.0:107; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)108; GCN-NEXT:    ;;#ASMSTART109; GCN-NEXT:    ; def v1110; GCN-NEXT:    ;;#ASMEND111; GCN-NEXT:    ;;#ASMSTART112; GCN-NEXT:    ; def v2113; GCN-NEXT:    ;;#ASMEND114; GCN-NEXT:    ds_write2_b32 v0, v1, v2 offset0:10 offset1:24115; GCN-NEXT:    s_waitcnt lgkmcnt(0)116; GCN-NEXT:    s_setpc_b64 s[30:31]117  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10118  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24119  %av0 = call i32 asm "; def $0", "=^VA"()120  %av1 = call i32 asm "; def $0", "=^VA"()121  store i32 %av0, ptr addrspace(3) %gep.0122  store i32 %av1, ptr addrspace(3) %gep.1123  ret void124}125 126; Should be able to constrain the AV operand to VGPR to enable merging127define void @ds_write2_b32_av_v(ptr addrspace(3) %lds) #0 {128; GCN-LABEL: ds_write2_b32_av_v:129; GCN:       ; %bb.0:130; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)131; GCN-NEXT:    ;;#ASMSTART132; GCN-NEXT:    ; def v1133; GCN-NEXT:    ;;#ASMEND134; GCN-NEXT:    ;;#ASMSTART135; GCN-NEXT:    ; def v2136; GCN-NEXT:    ;;#ASMEND137; GCN-NEXT:    ds_write2_b32 v0, v1, v2 offset0:10 offset1:24138; GCN-NEXT:    s_waitcnt lgkmcnt(0)139; GCN-NEXT:    s_setpc_b64 s[30:31]140  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10141  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24142  %av0 = call i32 asm "; def $0", "=^VA"()143  %v0 = call i32 asm "; def $0", "=v"()144  store i32 %av0, ptr addrspace(3) %gep.0145  store i32 %v0, ptr addrspace(3) %gep.1146  ret void147}148 149; Should be able to constrain the AV operand to VGPR to enable merging150define void @ds_write2_b32_v_av(ptr addrspace(3) %lds) #0 {151; GCN-LABEL: ds_write2_b32_v_av:152; GCN:       ; %bb.0:153; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)154; GCN-NEXT:    ;;#ASMSTART155; GCN-NEXT:    ; def v1156; GCN-NEXT:    ;;#ASMEND157; GCN-NEXT:    ;;#ASMSTART158; GCN-NEXT:    ; def v2159; GCN-NEXT:    ;;#ASMEND160; GCN-NEXT:    ds_write2_b32 v0, v1, v2 offset0:10 offset1:24161; GCN-NEXT:    s_waitcnt lgkmcnt(0)162; GCN-NEXT:    s_setpc_b64 s[30:31]163  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10164  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24165  %v0 = call i32 asm "; def $0", "=v"()166  %av0 = call i32 asm "; def $0", "=^VA"()167  store i32 %v0, ptr addrspace(3) %gep.0168  store i32 %av0, ptr addrspace(3) %gep.1169  ret void170}171 172; Should be able to constrain the AV operand to AGPR to enable merging173define void @ds_write2_b32_av_a(ptr addrspace(3) %lds) #0 {174; GCN-LABEL: ds_write2_b32_av_a:175; GCN:       ; %bb.0:176; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)177; GCN-NEXT:    ;;#ASMSTART178; GCN-NEXT:    ; def v1179; GCN-NEXT:    ;;#ASMEND180; GCN-NEXT:    ;;#ASMSTART181; GCN-NEXT:    ; def a0182; GCN-NEXT:    ;;#ASMEND183; GCN-NEXT:    ds_write_b32 v0, v1 offset:40184; GCN-NEXT:    ds_write_b32 v0, a0 offset:96185; GCN-NEXT:    s_waitcnt lgkmcnt(0)186; GCN-NEXT:    s_setpc_b64 s[30:31]187  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10188  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24189  %av0 = call i32 asm "; def $0", "=^VA"()190  %a0 = call i32 asm "; def $0", "=a"()191  store i32 %av0, ptr addrspace(3) %gep.0192  store i32 %a0, ptr addrspace(3) %gep.1193  ret void194}195 196; Should be able to constrain the AV operand to AGPR to enable merging197define void @ds_write2_b32_a_av(ptr addrspace(3) %lds) #0 {198; GCN-LABEL: ds_write2_b32_a_av:199; GCN:       ; %bb.0:200; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)201; GCN-NEXT:    ;;#ASMSTART202; GCN-NEXT:    ; def a0203; GCN-NEXT:    ;;#ASMEND204; GCN-NEXT:    ;;#ASMSTART205; GCN-NEXT:    ; def v1206; GCN-NEXT:    ;;#ASMEND207; GCN-NEXT:    ds_write_b32 v0, a0 offset:40208; GCN-NEXT:    ds_write_b32 v0, v1 offset:96209; GCN-NEXT:    s_waitcnt lgkmcnt(0)210; GCN-NEXT:    s_setpc_b64 s[30:31]211  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10212  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24213  %a0 = call i32 asm "; def $0", "=a"()214  %av0 = call i32 asm "; def $0", "=^VA"()215  store i32 %a0, ptr addrspace(3) %gep.0216  store i32 %av0, ptr addrspace(3) %gep.1217  ret void218}219 220define void @ds_write2st64_b32_a_a(ptr addrspace(3) %lds) #0 {221; GCN-LABEL: ds_write2st64_b32_a_a:222; GCN:       ; %bb.0:223; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)224; GCN-NEXT:    ;;#ASMSTART225; GCN-NEXT:    ; def a0226; GCN-NEXT:    ;;#ASMEND227; GCN-NEXT:    ;;#ASMSTART228; GCN-NEXT:    ; def a1229; GCN-NEXT:    ;;#ASMEND230; GCN-NEXT:    ds_write_b32 v0, a0 offset:256231; GCN-NEXT:    ds_write_b32 v0, a1 offset:1024232; GCN-NEXT:    s_waitcnt lgkmcnt(0)233; GCN-NEXT:    s_setpc_b64 s[30:31]234  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64235  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256236  %a0 = call i32 asm "; def $0", "=a"()237  %a1 = call i32 asm "; def $0", "=a"()238  store i32 %a0, ptr addrspace(3) %gep.0239  store i32 %a1, ptr addrspace(3) %gep.1240  ret void241}242 243define void @ds_write2st64_b32_a_v(ptr addrspace(3) %lds) #0 {244; GCN-LABEL: ds_write2st64_b32_a_v:245; GCN:       ; %bb.0:246; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)247; GCN-NEXT:    ;;#ASMSTART248; GCN-NEXT:    ; def a0249; GCN-NEXT:    ;;#ASMEND250; GCN-NEXT:    ;;#ASMSTART251; GCN-NEXT:    ; def v1252; GCN-NEXT:    ;;#ASMEND253; GCN-NEXT:    ds_write_b32 v0, a0 offset:256254; GCN-NEXT:    ds_write_b32 v0, v1 offset:1024255; GCN-NEXT:    s_waitcnt lgkmcnt(0)256; GCN-NEXT:    s_setpc_b64 s[30:31]257  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64258  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256259  %a0 = call i32 asm "; def $0", "=a"()260  %v0 = call i32 asm "; def $0", "=v"()261  store i32 %a0, ptr addrspace(3) %gep.0262  store i32 %v0, ptr addrspace(3) %gep.1263  ret void264}265 266define void @ds_write2st64_b32_v_a(ptr addrspace(3) %lds) #0 {267; GCN-LABEL: ds_write2st64_b32_v_a:268; GCN:       ; %bb.0:269; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)270; GCN-NEXT:    ;;#ASMSTART271; GCN-NEXT:    ; def v1272; GCN-NEXT:    ;;#ASMEND273; GCN-NEXT:    ;;#ASMSTART274; GCN-NEXT:    ; def a0275; GCN-NEXT:    ;;#ASMEND276; GCN-NEXT:    ds_write_b32 v0, v1 offset:256277; GCN-NEXT:    ds_write_b32 v0, a0 offset:1024278; GCN-NEXT:    s_waitcnt lgkmcnt(0)279; GCN-NEXT:    s_setpc_b64 s[30:31]280  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64281  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256282  %v0 = call i32 asm "; def $0", "=a"()283  %a0 = call i32 asm "; def $0", "=v"()284  store i32 %a0, ptr addrspace(3) %gep.0285  store i32 %v0, ptr addrspace(3) %gep.1286  ret void287}288 289define void @ds_write2st64_b32_v_v(ptr addrspace(3) %lds) #0 {290; GCN-LABEL: ds_write2st64_b32_v_v:291; GCN:       ; %bb.0:292; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)293; GCN-NEXT:    ;;#ASMSTART294; GCN-NEXT:    ; def v1295; GCN-NEXT:    ;;#ASMEND296; GCN-NEXT:    ;;#ASMSTART297; GCN-NEXT:    ; def v2298; GCN-NEXT:    ;;#ASMEND299; GCN-NEXT:    ds_write2st64_b32 v0, v1, v2 offset0:1 offset1:4300; GCN-NEXT:    s_waitcnt lgkmcnt(0)301; GCN-NEXT:    s_setpc_b64 s[30:31]302  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64303  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256304  %v0 = call i32 asm "; def $0", "=v"()305  %v1 = call i32 asm "; def $0", "=v"()306  store i32 %v0, ptr addrspace(3) %gep.0307  store i32 %v1, ptr addrspace(3) %gep.1308  ret void309}310 311define void @ds_write2st64_b32_av_av(ptr addrspace(3) %lds) #0 {312; GCN-LABEL: ds_write2st64_b32_av_av:313; GCN:       ; %bb.0:314; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)315; GCN-NEXT:    ;;#ASMSTART316; GCN-NEXT:    ; def v1317; GCN-NEXT:    ;;#ASMEND318; GCN-NEXT:    ;;#ASMSTART319; GCN-NEXT:    ; def v2320; GCN-NEXT:    ;;#ASMEND321; GCN-NEXT:    ds_write2st64_b32 v0, v1, v2 offset0:1 offset1:4322; GCN-NEXT:    s_waitcnt lgkmcnt(0)323; GCN-NEXT:    s_setpc_b64 s[30:31]324  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64325  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256326  %av0 = call i32 asm "; def $0", "=^VA"()327  %av1 = call i32 asm "; def $0", "=^VA"()328  store i32 %av0, ptr addrspace(3) %gep.0329  store i32 %av1, ptr addrspace(3) %gep.1330  ret void331}332 333define void @ds_write2st64_b32_av_v(ptr addrspace(3) %lds) #0 {334; GCN-LABEL: ds_write2st64_b32_av_v:335; GCN:       ; %bb.0:336; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)337; GCN-NEXT:    ;;#ASMSTART338; GCN-NEXT:    ; def v1339; GCN-NEXT:    ;;#ASMEND340; GCN-NEXT:    ;;#ASMSTART341; GCN-NEXT:    ; def v2342; GCN-NEXT:    ;;#ASMEND343; GCN-NEXT:    ds_write2st64_b32 v0, v1, v2 offset0:1 offset1:4344; GCN-NEXT:    s_waitcnt lgkmcnt(0)345; GCN-NEXT:    s_setpc_b64 s[30:31]346  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64347  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256348  %av0 = call i32 asm "; def $0", "=^VA"()349  %v0 = call i32 asm "; def $0", "=v"()350  store i32 %av0, ptr addrspace(3) %gep.0351  store i32 %v0, ptr addrspace(3) %gep.1352  ret void353}354 355 356define void @ds_write2st64_b32_v_av(ptr addrspace(3) %lds) #0 {357; GCN-LABEL: ds_write2st64_b32_v_av:358; GCN:       ; %bb.0:359; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)360; GCN-NEXT:    ;;#ASMSTART361; GCN-NEXT:    ; def v1362; GCN-NEXT:    ;;#ASMEND363; GCN-NEXT:    ;;#ASMSTART364; GCN-NEXT:    ; def v2365; GCN-NEXT:    ;;#ASMEND366; GCN-NEXT:    ds_write2st64_b32 v0, v1, v2 offset0:1 offset1:4367; GCN-NEXT:    s_waitcnt lgkmcnt(0)368; GCN-NEXT:    s_setpc_b64 s[30:31]369  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64370  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256371  %v0 = call i32 asm "; def $0", "=v"()372  %av1 = call i32 asm "; def $0", "=^VA"()373  store i32 %v0, ptr addrspace(3) %gep.0374  store i32 %av1, ptr addrspace(3) %gep.1375  ret void376}377 378define void @ds_write2st64_b32_av_a(ptr addrspace(3) %lds) #0 {379; GCN-LABEL: ds_write2st64_b32_av_a:380; GCN:       ; %bb.0:381; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)382; GCN-NEXT:    ;;#ASMSTART383; GCN-NEXT:    ; def v1384; GCN-NEXT:    ;;#ASMEND385; GCN-NEXT:    ;;#ASMSTART386; GCN-NEXT:    ; def a0387; GCN-NEXT:    ;;#ASMEND388; GCN-NEXT:    ds_write_b32 v0, v1 offset:256389; GCN-NEXT:    ds_write_b32 v0, a0 offset:1024390; GCN-NEXT:    s_waitcnt lgkmcnt(0)391; GCN-NEXT:    s_setpc_b64 s[30:31]392  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64393  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256394  %av0 = call i32 asm "; def $0", "=^VA"()395  %a0 = call i32 asm "; def $0", "=a"()396  store i32 %av0, ptr addrspace(3) %gep.0397  store i32 %a0, ptr addrspace(3) %gep.1398  ret void399}400 401 402define void @ds_write2st64_b32_a_av(ptr addrspace(3) %lds) #0 {403; GCN-LABEL: ds_write2st64_b32_a_av:404; GCN:       ; %bb.0:405; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)406; GCN-NEXT:    ;;#ASMSTART407; GCN-NEXT:    ; def a0408; GCN-NEXT:    ;;#ASMEND409; GCN-NEXT:    ;;#ASMSTART410; GCN-NEXT:    ; def v1411; GCN-NEXT:    ;;#ASMEND412; GCN-NEXT:    ds_write_b32 v0, a0 offset:256413; GCN-NEXT:    ds_write_b32 v0, v1 offset:1024414; GCN-NEXT:    s_waitcnt lgkmcnt(0)415; GCN-NEXT:    s_setpc_b64 s[30:31]416  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 64417  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 256418  %a0 = call i32 asm "; def $0", "=a"()419  %av1 = call i32 asm "; def $0", "=^VA"()420  store i32 %a0, ptr addrspace(3) %gep.0421  store i32 %av1, ptr addrspace(3) %gep.1422  ret void423}424 425define void @ds_write2_b32_av_av_no_vgprs(ptr addrspace(3) %lds) #0 {426; GCN-LABEL: ds_write2_b32_av_av_no_vgprs:427; GCN:       ; %bb.0:428; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)429; GCN-NEXT:    v_accvgpr_write_b32 a3, v40 ; Reload Reuse430; GCN-NEXT:    v_accvgpr_write_b32 a4, v41 ; Reload Reuse431; GCN-NEXT:    v_accvgpr_write_b32 a5, v42 ; Reload Reuse432; GCN-NEXT:    v_accvgpr_write_b32 a6, v43 ; Reload Reuse433; GCN-NEXT:    v_accvgpr_write_b32 a7, v44 ; Reload Reuse434; GCN-NEXT:    v_accvgpr_write_b32 a8, v45 ; Reload Reuse435; GCN-NEXT:    v_accvgpr_write_b32 a9, v46 ; Reload Reuse436; GCN-NEXT:    v_accvgpr_write_b32 a10, v47 ; Reload Reuse437; GCN-NEXT:    v_accvgpr_write_b32 a11, v56 ; Reload Reuse438; GCN-NEXT:    v_accvgpr_write_b32 a12, v57 ; Reload Reuse439; GCN-NEXT:    v_accvgpr_write_b32 a13, v58 ; Reload Reuse440; GCN-NEXT:    v_accvgpr_write_b32 a14, v59 ; Reload Reuse441; GCN-NEXT:    v_accvgpr_write_b32 a15, v60 ; Reload Reuse442; GCN-NEXT:    v_accvgpr_write_b32 a16, v61 ; Reload Reuse443; GCN-NEXT:    v_accvgpr_write_b32 a17, v62 ; Reload Reuse444; GCN-NEXT:    v_accvgpr_write_b32 a18, v63 ; Reload Reuse445; GCN-NEXT:    v_accvgpr_write_b32 a0, v0446; GCN-NEXT:    ;;#ASMSTART447; GCN-NEXT:    ; def a1448; GCN-NEXT:    ;;#ASMEND449; GCN-NEXT:    ;;#ASMSTART450; GCN-NEXT:    ; def a2451; GCN-NEXT:    ;;#ASMEND452; GCN-NEXT:    ;;#ASMSTART453; GCN-NEXT:    ; def v[0:31]454; GCN-NEXT:    ;;#ASMEND455; GCN-NEXT:    buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill456; GCN-NEXT:    s_nop 0457; GCN-NEXT:    buffer_store_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill458; GCN-NEXT:    buffer_store_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill459; GCN-NEXT:    buffer_store_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill460; GCN-NEXT:    buffer_store_dword v4, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill461; GCN-NEXT:    buffer_store_dword v5, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill462; GCN-NEXT:    buffer_store_dword v6, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill463; GCN-NEXT:    buffer_store_dword v7, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill464; GCN-NEXT:    buffer_store_dword v8, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill465; GCN-NEXT:    buffer_store_dword v9, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill466; GCN-NEXT:    buffer_store_dword v10, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill467; GCN-NEXT:    buffer_store_dword v11, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill468; GCN-NEXT:    buffer_store_dword v12, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill469; GCN-NEXT:    buffer_store_dword v13, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill470; GCN-NEXT:    buffer_store_dword v14, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill471; GCN-NEXT:    buffer_store_dword v15, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill472; GCN-NEXT:    buffer_store_dword v16, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill473; GCN-NEXT:    buffer_store_dword v17, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill474; GCN-NEXT:    buffer_store_dword v18, off, s[0:3], s32 offset:72 ; 4-byte Folded Spill475; GCN-NEXT:    v_accvgpr_write_b32 a19, v31 ; Reload Reuse476; GCN-NEXT:    v_accvgpr_read_b32 v0, a0477; GCN-NEXT:    v_accvgpr_read_b32 v1, a1478; GCN-NEXT:    v_accvgpr_read_b32 v2, a2479; GCN-NEXT:    ds_write2_b32 v0, v1, v2 offset0:10 offset1:24480; GCN-NEXT:    v_accvgpr_write_b32 a31, v19 ; Reload Reuse481; GCN-NEXT:    v_accvgpr_write_b32 a30, v20 ; Reload Reuse482; GCN-NEXT:    v_accvgpr_write_b32 a29, v21 ; Reload Reuse483; GCN-NEXT:    v_accvgpr_write_b32 a28, v22 ; Reload Reuse484; GCN-NEXT:    v_accvgpr_write_b32 a27, v23 ; Reload Reuse485; GCN-NEXT:    v_accvgpr_write_b32 a26, v24 ; Reload Reuse486; GCN-NEXT:    v_accvgpr_write_b32 a25, v25 ; Reload Reuse487; GCN-NEXT:    v_accvgpr_write_b32 a24, v26 ; Reload Reuse488; GCN-NEXT:    v_accvgpr_write_b32 a23, v27 ; Reload Reuse489; GCN-NEXT:    v_accvgpr_write_b32 a22, v28 ; Reload Reuse490; GCN-NEXT:    v_accvgpr_write_b32 a21, v29 ; Reload Reuse491; GCN-NEXT:    v_accvgpr_write_b32 a20, v30 ; Reload Reuse492; GCN-NEXT:    buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload493; GCN-NEXT:    buffer_load_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload494; GCN-NEXT:    buffer_load_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload495; GCN-NEXT:    buffer_load_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload496; GCN-NEXT:    buffer_load_dword v4, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload497; GCN-NEXT:    buffer_load_dword v5, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload498; GCN-NEXT:    buffer_load_dword v6, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload499; GCN-NEXT:    buffer_load_dword v7, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload500; GCN-NEXT:    buffer_load_dword v8, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload501; GCN-NEXT:    buffer_load_dword v9, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload502; GCN-NEXT:    buffer_load_dword v10, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload503; GCN-NEXT:    buffer_load_dword v11, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload504; GCN-NEXT:    buffer_load_dword v12, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload505; GCN-NEXT:    buffer_load_dword v13, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload506; GCN-NEXT:    buffer_load_dword v14, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload507; GCN-NEXT:    buffer_load_dword v15, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload508; GCN-NEXT:    buffer_load_dword v16, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload509; GCN-NEXT:    buffer_load_dword v17, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload510; GCN-NEXT:    buffer_load_dword v18, off, s[0:3], s32 offset:72 ; 4-byte Folded Reload511; GCN-NEXT:    v_accvgpr_read_b32 v19, a31 ; Reload Reuse512; GCN-NEXT:    v_accvgpr_read_b32 v20, a30 ; Reload Reuse513; GCN-NEXT:    v_accvgpr_read_b32 v21, a29 ; Reload Reuse514; GCN-NEXT:    v_accvgpr_read_b32 v22, a28 ; Reload Reuse515; GCN-NEXT:    v_accvgpr_read_b32 v23, a27 ; Reload Reuse516; GCN-NEXT:    v_accvgpr_read_b32 v24, a26 ; Reload Reuse517; GCN-NEXT:    v_accvgpr_read_b32 v25, a25 ; Reload Reuse518; GCN-NEXT:    v_accvgpr_read_b32 v26, a24 ; Reload Reuse519; GCN-NEXT:    v_accvgpr_read_b32 v27, a23 ; Reload Reuse520; GCN-NEXT:    v_accvgpr_read_b32 v28, a22 ; Reload Reuse521; GCN-NEXT:    v_accvgpr_read_b32 v29, a21 ; Reload Reuse522; GCN-NEXT:    v_accvgpr_read_b32 v30, a20 ; Reload Reuse523; GCN-NEXT:    s_waitcnt vmcnt(0)524; GCN-NEXT:    v_accvgpr_read_b32 v31, a19 ; Reload Reuse525; GCN-NEXT:    ;;#ASMSTART526; GCN-NEXT:    ; use v[0:31]527; GCN-NEXT:    ;;#ASMEND528; GCN-NEXT:    v_accvgpr_read_b32 v63, a18 ; Reload Reuse529; GCN-NEXT:    v_accvgpr_read_b32 v62, a17 ; Reload Reuse530; GCN-NEXT:    v_accvgpr_read_b32 v61, a16 ; Reload Reuse531; GCN-NEXT:    v_accvgpr_read_b32 v60, a15 ; Reload Reuse532; GCN-NEXT:    v_accvgpr_read_b32 v59, a14 ; Reload Reuse533; GCN-NEXT:    v_accvgpr_read_b32 v58, a13 ; Reload Reuse534; GCN-NEXT:    v_accvgpr_read_b32 v57, a12 ; Reload Reuse535; GCN-NEXT:    v_accvgpr_read_b32 v56, a11 ; Reload Reuse536; GCN-NEXT:    v_accvgpr_read_b32 v47, a10 ; Reload Reuse537; GCN-NEXT:    v_accvgpr_read_b32 v46, a9 ; Reload Reuse538; GCN-NEXT:    v_accvgpr_read_b32 v45, a8 ; Reload Reuse539; GCN-NEXT:    v_accvgpr_read_b32 v44, a7 ; Reload Reuse540; GCN-NEXT:    v_accvgpr_read_b32 v43, a6 ; Reload Reuse541; GCN-NEXT:    v_accvgpr_read_b32 v42, a5 ; Reload Reuse542; GCN-NEXT:    v_accvgpr_read_b32 v41, a4 ; Reload Reuse543; GCN-NEXT:    v_accvgpr_read_b32 v40, a3 ; Reload Reuse544; GCN-NEXT:    s_waitcnt lgkmcnt(0)545; GCN-NEXT:    s_setpc_b64 s[30:31]546  %gep.0 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 10547  %gep.1 = getelementptr inbounds [512 x i32], ptr addrspace(3) %lds, i32 0, i32 24548  %av0 = call i32 asm sideeffect "; def $0", "=^VA"()549  %av1 = call i32 asm sideeffect "; def $0", "=^VA"()550  %vgpr.def = call { <32 x i32>, <32 x i32> }  asm sideeffect "; def $0", "=${v[0:31]},=${v[32:63]}"()551  %vgpr.0 = extractvalue { <32 x i32>, <32 x i32> } %vgpr.def, 0552  %vgpr.1 = extractvalue { <32 x i32>, <32 x i32> } %vgpr.def, 1553  store i32 %av0, ptr addrspace(3) %gep.0554  store i32 %av1, ptr addrspace(3) %gep.1555  call void asm sideeffect "; use $0", "{v[0:31]},{v[32:63]}"(<32 x i32> %vgpr.0, <32 x i32> %vgpr.1)556  ret void557}558 559;---------------------------------------------------------------------560; b64 cases561;---------------------------------------------------------------------562 563; Test a pattern that can form ds_write_b64 with data in AGPRs564define void @ds_write2_b64_a_a(ptr addrspace(3) %lds) #0 {565; GCN-LABEL: ds_write2_b64_a_a:566; GCN:       ; %bb.0:567; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)568; GCN-NEXT:    ;;#ASMSTART569; GCN-NEXT:    ; def a[0:1]570; GCN-NEXT:    ;;#ASMEND571; GCN-NEXT:    ;;#ASMSTART572; GCN-NEXT:    ; def a[2:3]573; GCN-NEXT:    ;;#ASMEND574; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:80575; GCN-NEXT:    ds_write_b64 v0, a[2:3] offset:192576; GCN-NEXT:    s_waitcnt lgkmcnt(0)577; GCN-NEXT:    s_setpc_b64 s[30:31]578  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 10579  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 24580  %a0 = call i64 asm "; def $0", "=a"()581  %a1 = call i64 asm "; def $0", "=a"()582  store i64 %a0, ptr addrspace(3) %gep.0583  store i64 %a1, ptr addrspace(3) %gep.1584  ret void585}586 587define void @ds_write2_b64_a_v(ptr addrspace(3) %lds) #0 {588; GCN-LABEL: ds_write2_b64_a_v:589; GCN:       ; %bb.0:590; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)591; GCN-NEXT:    ;;#ASMSTART592; GCN-NEXT:    ; def a[0:1]593; GCN-NEXT:    ;;#ASMEND594; GCN-NEXT:    ;;#ASMSTART595; GCN-NEXT:    ; def v[2:3]596; GCN-NEXT:    ;;#ASMEND597; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:80598; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:192599; GCN-NEXT:    s_waitcnt lgkmcnt(0)600; GCN-NEXT:    s_setpc_b64 s[30:31]601  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 10602  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 24603  %a0 = call i64 asm "; def $0", "=a"()604  %v0 = call i64 asm "; def $0", "=v"()605  store i64 %a0, ptr addrspace(3) %gep.0606  store i64 %v0, ptr addrspace(3) %gep.1607  ret void608}609 610define void @ds_write2_b64_v_a(ptr addrspace(3) %lds) #0 {611; GCN-LABEL: ds_write2_b64_v_a:612; GCN:       ; %bb.0:613; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)614; GCN-NEXT:    ;;#ASMSTART615; GCN-NEXT:    ; def a[0:1]616; GCN-NEXT:    ;;#ASMEND617; GCN-NEXT:    ;;#ASMSTART618; GCN-NEXT:    ; def v[2:3]619; GCN-NEXT:    ;;#ASMEND620; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:80621; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:192622; GCN-NEXT:    s_waitcnt lgkmcnt(0)623; GCN-NEXT:    s_setpc_b64 s[30:31]624  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 10625  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 24626  %v0 = call i64 asm "; def $0", "=v"()627  %a0 = call i64 asm "; def $0", "=a"()628  store i64 %a0, ptr addrspace(3) %gep.0629  store i64 %v0, ptr addrspace(3) %gep.1630  ret void631}632 633define void @ds_write2_b64_v_v(ptr addrspace(3) %lds) #0 {634; GCN-LABEL: ds_write2_b64_v_v:635; GCN:       ; %bb.0:636; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)637; GCN-NEXT:    ;;#ASMSTART638; GCN-NEXT:    ; def v[2:3]639; GCN-NEXT:    ;;#ASMEND640; GCN-NEXT:    ;;#ASMSTART641; GCN-NEXT:    ; def v[4:5]642; GCN-NEXT:    ;;#ASMEND643; GCN-NEXT:    ds_write2_b64 v0, v[2:3], v[4:5] offset0:10 offset1:24644; GCN-NEXT:    s_waitcnt lgkmcnt(0)645; GCN-NEXT:    s_setpc_b64 s[30:31]646  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 10647  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 24648  %v0 = call i64 asm "; def $0", "=v"()649  %v1 = call i64 asm "; def $0", "=v"()650  store i64 %v0, ptr addrspace(3) %gep.0651  store i64 %v1, ptr addrspace(3) %gep.1652  ret void653}654 655define void @ds_write2_b64_av_av(ptr addrspace(3) %lds) #0 {656; GCN-LABEL: ds_write2_b64_av_av:657; GCN:       ; %bb.0:658; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)659; GCN-NEXT:    ;;#ASMSTART660; GCN-NEXT:    ; def v[2:3]661; GCN-NEXT:    ;;#ASMEND662; GCN-NEXT:    ;;#ASMSTART663; GCN-NEXT:    ; def v[4:5]664; GCN-NEXT:    ;;#ASMEND665; GCN-NEXT:    ds_write2_b64 v0, v[2:3], v[4:5] offset0:10 offset1:24666; GCN-NEXT:    s_waitcnt lgkmcnt(0)667; GCN-NEXT:    s_setpc_b64 s[30:31]668  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 10669  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 24670  %av0 = call i64 asm "; def $0", "=^VA"()671  %av1 = call i64 asm "; def $0", "=^VA"()672  store i64 %av0, ptr addrspace(3) %gep.0673  store i64 %av1, ptr addrspace(3) %gep.1674  ret void675}676 677; Should be able to constrain the AV operand to VGPR to enable merging678define void @ds_write2_b64_av_v(ptr addrspace(3) %lds) #0 {679; GCN-LABEL: ds_write2_b64_av_v:680; GCN:       ; %bb.0:681; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)682; GCN-NEXT:    ;;#ASMSTART683; GCN-NEXT:    ; def v[2:3]684; GCN-NEXT:    ;;#ASMEND685; GCN-NEXT:    ;;#ASMSTART686; GCN-NEXT:    ; def v[4:5]687; GCN-NEXT:    ;;#ASMEND688; GCN-NEXT:    ds_write2_b64 v0, v[2:3], v[4:5] offset0:10 offset1:24689; GCN-NEXT:    s_waitcnt lgkmcnt(0)690; GCN-NEXT:    s_setpc_b64 s[30:31]691  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 10692  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 24693  %av0 = call i64 asm "; def $0", "=^VA"()694  %v0 = call i64 asm "; def $0", "=v"()695  store i64 %av0, ptr addrspace(3) %gep.0696  store i64 %v0, ptr addrspace(3) %gep.1697  ret void698}699 700; Should be able to constrain the AV operand to VGPR to enable merging701define void @ds_write2_b64_v_av(ptr addrspace(3) %lds) #0 {702; GCN-LABEL: ds_write2_b64_v_av:703; GCN:       ; %bb.0:704; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)705; GCN-NEXT:    ;;#ASMSTART706; GCN-NEXT:    ; def v[2:3]707; GCN-NEXT:    ;;#ASMEND708; GCN-NEXT:    ;;#ASMSTART709; GCN-NEXT:    ; def v[4:5]710; GCN-NEXT:    ;;#ASMEND711; GCN-NEXT:    ds_write2_b64 v0, v[2:3], v[4:5] offset0:10 offset1:24712; GCN-NEXT:    s_waitcnt lgkmcnt(0)713; GCN-NEXT:    s_setpc_b64 s[30:31]714  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 10715  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 24716  %v0 = call i64 asm "; def $0", "=v"()717  %av0 = call i64 asm "; def $0", "=^VA"()718  store i64 %v0, ptr addrspace(3) %gep.0719  store i64 %av0, ptr addrspace(3) %gep.1720  ret void721}722 723; Should be able to constrain the AV operand to AGPR to enable merging724define void @ds_write2_b64_av_a(ptr addrspace(3) %lds) #0 {725; GCN-LABEL: ds_write2_b64_av_a:726; GCN:       ; %bb.0:727; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)728; GCN-NEXT:    ;;#ASMSTART729; GCN-NEXT:    ; def v[2:3]730; GCN-NEXT:    ;;#ASMEND731; GCN-NEXT:    ;;#ASMSTART732; GCN-NEXT:    ; def a[0:1]733; GCN-NEXT:    ;;#ASMEND734; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:80735; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:192736; GCN-NEXT:    s_waitcnt lgkmcnt(0)737; GCN-NEXT:    s_setpc_b64 s[30:31]738  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 10739  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 24740  %av0 = call i64 asm "; def $0", "=^VA"()741  %a0 = call i64 asm "; def $0", "=a"()742  store i64 %av0, ptr addrspace(3) %gep.0743  store i64 %a0, ptr addrspace(3) %gep.1744  ret void745}746 747; Should be able to constrain the AV operand to AGPR to enable merging748define void @ds_write2_b64x_a_av(ptr addrspace(3) %lds) #0 {749; GCN-LABEL: ds_write2_b64x_a_av:750; GCN:       ; %bb.0:751; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)752; GCN-NEXT:    ;;#ASMSTART753; GCN-NEXT:    ; def a[0:1]754; GCN-NEXT:    ;;#ASMEND755; GCN-NEXT:    ;;#ASMSTART756; GCN-NEXT:    ; def v[2:3]757; GCN-NEXT:    ;;#ASMEND758; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:80759; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:192760; GCN-NEXT:    s_waitcnt lgkmcnt(0)761; GCN-NEXT:    s_setpc_b64 s[30:31]762  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 10763  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i64 0, i64 24764  %a0 = call i64 asm "; def $0", "=a"()765  %av0 = call i64 asm "; def $0", "=^VA"()766  store i64 %a0, ptr addrspace(3) %gep.0767  store i64 %av0, ptr addrspace(3) %gep.1768  ret void769}770 771define void @ds_write2st64_b64_a_a(ptr addrspace(3) %lds) #0 {772; GCN-LABEL: ds_write2st64_b64_a_a:773; GCN:       ; %bb.0:774; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)775; GCN-NEXT:    ;;#ASMSTART776; GCN-NEXT:    ; def a[0:1]777; GCN-NEXT:    ;;#ASMEND778; GCN-NEXT:    ;;#ASMSTART779; GCN-NEXT:    ; def a[2:3]780; GCN-NEXT:    ;;#ASMEND781; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:512782; GCN-NEXT:    ds_write_b64 v0, a[2:3] offset:2048783; GCN-NEXT:    s_waitcnt lgkmcnt(0)784; GCN-NEXT:    s_setpc_b64 s[30:31]785  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64786  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256787  %a0 = call i64 asm "; def $0", "=a"()788  %a1 = call i64 asm "; def $0", "=a"()789  store i64 %a0, ptr addrspace(3) %gep.0790  store i64 %a1, ptr addrspace(3) %gep.1791  ret void792}793 794define void @ds_write2st64_b64_a_v(ptr addrspace(3) %lds) #0 {795; GCN-LABEL: ds_write2st64_b64_a_v:796; GCN:       ; %bb.0:797; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)798; GCN-NEXT:    ;;#ASMSTART799; GCN-NEXT:    ; def a[0:1]800; GCN-NEXT:    ;;#ASMEND801; GCN-NEXT:    ;;#ASMSTART802; GCN-NEXT:    ; def v[2:3]803; GCN-NEXT:    ;;#ASMEND804; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:512805; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:2048806; GCN-NEXT:    s_waitcnt lgkmcnt(0)807; GCN-NEXT:    s_setpc_b64 s[30:31]808  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64809  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256810  %a0 = call i64 asm "; def $0", "=a"()811  %v0 = call i64 asm "; def $0", "=v"()812  store i64 %a0, ptr addrspace(3) %gep.0813  store i64 %v0, ptr addrspace(3) %gep.1814  ret void815}816 817define void @ds_write2st64_b64_v_a(ptr addrspace(3) %lds) #0 {818; GCN-LABEL: ds_write2st64_b64_v_a:819; GCN:       ; %bb.0:820; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)821; GCN-NEXT:    ;;#ASMSTART822; GCN-NEXT:    ; def v[2:3]823; GCN-NEXT:    ;;#ASMEND824; GCN-NEXT:    ;;#ASMSTART825; GCN-NEXT:    ; def a[0:1]826; GCN-NEXT:    ;;#ASMEND827; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:512828; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:2048829; GCN-NEXT:    s_waitcnt lgkmcnt(0)830; GCN-NEXT:    s_setpc_b64 s[30:31]831  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64832  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256833  %v0 = call i64 asm "; def $0", "=a"()834  %a0 = call i64 asm "; def $0", "=v"()835  store i64 %a0, ptr addrspace(3) %gep.0836  store i64 %v0, ptr addrspace(3) %gep.1837  ret void838}839 840define void @ds_write2st64_b64_v_v(ptr addrspace(3) %lds) #0 {841; GCN-LABEL: ds_write2st64_b64_v_v:842; GCN:       ; %bb.0:843; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)844; GCN-NEXT:    ;;#ASMSTART845; GCN-NEXT:    ; def v[2:3]846; GCN-NEXT:    ;;#ASMEND847; GCN-NEXT:    ;;#ASMSTART848; GCN-NEXT:    ; def v[4:5]849; GCN-NEXT:    ;;#ASMEND850; GCN-NEXT:    ds_write2st64_b64 v0, v[2:3], v[4:5] offset0:1 offset1:4851; GCN-NEXT:    s_waitcnt lgkmcnt(0)852; GCN-NEXT:    s_setpc_b64 s[30:31]853  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64854  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256855  %v0 = call i64 asm "; def $0", "=v"()856  %v1 = call i64 asm "; def $0", "=v"()857  store i64 %v0, ptr addrspace(3) %gep.0858  store i64 %v1, ptr addrspace(3) %gep.1859  ret void860}861 862define void @ds_write2st64_b64_av_av(ptr addrspace(3) %lds) #0 {863; GCN-LABEL: ds_write2st64_b64_av_av:864; GCN:       ; %bb.0:865; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)866; GCN-NEXT:    ;;#ASMSTART867; GCN-NEXT:    ; def v[2:3]868; GCN-NEXT:    ;;#ASMEND869; GCN-NEXT:    ;;#ASMSTART870; GCN-NEXT:    ; def v[4:5]871; GCN-NEXT:    ;;#ASMEND872; GCN-NEXT:    ds_write2st64_b64 v0, v[2:3], v[4:5] offset0:1 offset1:4873; GCN-NEXT:    s_waitcnt lgkmcnt(0)874; GCN-NEXT:    s_setpc_b64 s[30:31]875  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64876  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256877  %av0 = call i64 asm "; def $0", "=^VA"()878  %av1 = call i64 asm "; def $0", "=^VA"()879  store i64 %av0, ptr addrspace(3) %gep.0880  store i64 %av1, ptr addrspace(3) %gep.1881  ret void882}883 884define void @ds_write2st64_b64_av_v(ptr addrspace(3) %lds) #0 {885; GCN-LABEL: ds_write2st64_b64_av_v:886; GCN:       ; %bb.0:887; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)888; GCN-NEXT:    ;;#ASMSTART889; GCN-NEXT:    ; def v[2:3]890; GCN-NEXT:    ;;#ASMEND891; GCN-NEXT:    ;;#ASMSTART892; GCN-NEXT:    ; def v[4:5]893; GCN-NEXT:    ;;#ASMEND894; GCN-NEXT:    ds_write2st64_b64 v0, v[2:3], v[4:5] offset0:1 offset1:4895; GCN-NEXT:    s_waitcnt lgkmcnt(0)896; GCN-NEXT:    s_setpc_b64 s[30:31]897  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64898  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256899  %av0 = call i64 asm "; def $0", "=^VA"()900  %v0 = call i64 asm "; def $0", "=v"()901  store i64 %av0, ptr addrspace(3) %gep.0902  store i64 %v0, ptr addrspace(3) %gep.1903  ret void904}905 906define void @ds_write2st64_b64_v_av(ptr addrspace(3) %lds) #0 {907; GCN-LABEL: ds_write2st64_b64_v_av:908; GCN:       ; %bb.0:909; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)910; GCN-NEXT:    ;;#ASMSTART911; GCN-NEXT:    ; def v[2:3]912; GCN-NEXT:    ;;#ASMEND913; GCN-NEXT:    ;;#ASMSTART914; GCN-NEXT:    ; def v[4:5]915; GCN-NEXT:    ;;#ASMEND916; GCN-NEXT:    ds_write2st64_b64 v0, v[2:3], v[4:5] offset0:1 offset1:4917; GCN-NEXT:    s_waitcnt lgkmcnt(0)918; GCN-NEXT:    s_setpc_b64 s[30:31]919  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64920  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256921  %v0 = call i64 asm "; def $0", "=v"()922  %av0 = call i64 asm "; def $0", "=^VA"()923  store i64 %v0, ptr addrspace(3) %gep.0924  store i64 %av0, ptr addrspace(3) %gep.1925  ret void926}927 928define void @ds_write2st64_b64_av_a(ptr addrspace(3) %lds) #0 {929; GCN-LABEL: ds_write2st64_b64_av_a:930; GCN:       ; %bb.0:931; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)932; GCN-NEXT:    ;;#ASMSTART933; GCN-NEXT:    ; def v[2:3]934; GCN-NEXT:    ;;#ASMEND935; GCN-NEXT:    ;;#ASMSTART936; GCN-NEXT:    ; def a[0:1]937; GCN-NEXT:    ;;#ASMEND938; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:512939; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:2048940; GCN-NEXT:    s_waitcnt lgkmcnt(0)941; GCN-NEXT:    s_setpc_b64 s[30:31]942  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64943  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256944  %av0 = call i64 asm "; def $0", "=^VA"()945  %a0 = call i64 asm "; def $0", "=a"()946  store i64 %av0, ptr addrspace(3) %gep.0947  store i64 %a0, ptr addrspace(3) %gep.1948  ret void949}950 951define void @ds_write2st64_b64_a_av(ptr addrspace(3) %lds) #0 {952; GCN-LABEL: ds_write2st64_b64_a_av:953; GCN:       ; %bb.0:954; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)955; GCN-NEXT:    ;;#ASMSTART956; GCN-NEXT:    ; def a[0:1]957; GCN-NEXT:    ;;#ASMEND958; GCN-NEXT:    ;;#ASMSTART959; GCN-NEXT:    ; def v[2:3]960; GCN-NEXT:    ;;#ASMEND961; GCN-NEXT:    ds_write_b64 v0, a[0:1] offset:512962; GCN-NEXT:    ds_write_b64 v0, v[2:3] offset:2048963; GCN-NEXT:    s_waitcnt lgkmcnt(0)964; GCN-NEXT:    s_setpc_b64 s[30:31]965  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 64966  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 256967  %a0 = call i64 asm "; def $0", "=a"()968  %av0 = call i64 asm "; def $0", "=^VA"()969  store i64 %a0, ptr addrspace(3) %gep.0970  store i64 %av0, ptr addrspace(3) %gep.1971  ret void972}973 974define void @ds_write2_b64_av_av_no_vgprs(ptr addrspace(3) %lds) #0 {975; GCN-LABEL: ds_write2_b64_av_av_no_vgprs:976; GCN:       ; %bb.0:977; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)978; GCN-NEXT:    v_accvgpr_write_b32 a1, v40 ; Reload Reuse979; GCN-NEXT:    v_accvgpr_write_b32 a6, v41 ; Reload Reuse980; GCN-NEXT:    v_accvgpr_write_b32 a7, v42 ; Reload Reuse981; GCN-NEXT:    v_accvgpr_write_b32 a8, v43 ; Reload Reuse982; GCN-NEXT:    v_accvgpr_write_b32 a9, v44 ; Reload Reuse983; GCN-NEXT:    v_accvgpr_write_b32 a10, v45 ; Reload Reuse984; GCN-NEXT:    v_accvgpr_write_b32 a11, v46 ; Reload Reuse985; GCN-NEXT:    v_accvgpr_write_b32 a12, v47 ; Reload Reuse986; GCN-NEXT:    v_accvgpr_write_b32 a13, v56 ; Reload Reuse987; GCN-NEXT:    v_accvgpr_write_b32 a14, v57 ; Reload Reuse988; GCN-NEXT:    v_accvgpr_write_b32 a15, v58 ; Reload Reuse989; GCN-NEXT:    v_accvgpr_write_b32 a16, v59 ; Reload Reuse990; GCN-NEXT:    v_accvgpr_write_b32 a17, v60 ; Reload Reuse991; GCN-NEXT:    v_accvgpr_write_b32 a18, v61 ; Reload Reuse992; GCN-NEXT:    v_accvgpr_write_b32 a19, v62 ; Reload Reuse993; GCN-NEXT:    v_accvgpr_write_b32 a20, v63 ; Reload Reuse994; GCN-NEXT:    v_accvgpr_write_b32 a0, v0995; GCN-NEXT:    ;;#ASMSTART996; GCN-NEXT:    ; def a[2:3]997; GCN-NEXT:    ;;#ASMEND998; GCN-NEXT:    ;;#ASMSTART999; GCN-NEXT:    ; def a[4:5]1000; GCN-NEXT:    ;;#ASMEND1001; GCN-NEXT:    ;;#ASMSTART1002; GCN-NEXT:    ; def v[0:31]1003; GCN-NEXT:    ;;#ASMEND1004; GCN-NEXT:    buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill1005; GCN-NEXT:    s_nop 01006; GCN-NEXT:    buffer_store_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill1007; GCN-NEXT:    buffer_store_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill1008; GCN-NEXT:    buffer_store_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill1009; GCN-NEXT:    buffer_store_dword v4, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill1010; GCN-NEXT:    buffer_store_dword v5, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill1011; GCN-NEXT:    buffer_store_dword v6, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill1012; GCN-NEXT:    buffer_store_dword v7, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill1013; GCN-NEXT:    buffer_store_dword v8, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill1014; GCN-NEXT:    buffer_store_dword v9, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill1015; GCN-NEXT:    buffer_store_dword v10, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill1016; GCN-NEXT:    buffer_store_dword v11, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill1017; GCN-NEXT:    buffer_store_dword v12, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill1018; GCN-NEXT:    buffer_store_dword v13, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill1019; GCN-NEXT:    buffer_store_dword v14, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill1020; GCN-NEXT:    buffer_store_dword v15, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill1021; GCN-NEXT:    buffer_store_dword v16, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill1022; GCN-NEXT:    buffer_store_dword v17, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill1023; GCN-NEXT:    buffer_store_dword v18, off, s[0:3], s32 offset:72 ; 4-byte Folded Spill1024; GCN-NEXT:    buffer_store_dword v19, off, s[0:3], s32 offset:76 ; 4-byte Folded Spill1025; GCN-NEXT:    buffer_store_dword v20, off, s[0:3], s32 offset:80 ; 4-byte Folded Spill1026; GCN-NEXT:    v_accvgpr_write_b32 a21, v31 ; Reload Reuse1027; GCN-NEXT:    v_accvgpr_read_b32 v2, a21028; GCN-NEXT:    v_accvgpr_read_b32 v4, a41029; GCN-NEXT:    v_accvgpr_read_b32 v0, a01030; GCN-NEXT:    v_accvgpr_read_b32 v3, a31031; GCN-NEXT:    v_accvgpr_read_b32 v5, a51032; GCN-NEXT:    ds_write2_b64 v0, v[2:3], v[4:5] offset0:10 offset1:241033; GCN-NEXT:    v_accvgpr_write_b32 a31, v21 ; Reload Reuse1034; GCN-NEXT:    v_accvgpr_write_b32 a30, v22 ; Reload Reuse1035; GCN-NEXT:    v_accvgpr_write_b32 a29, v23 ; Reload Reuse1036; GCN-NEXT:    v_accvgpr_write_b32 a28, v24 ; Reload Reuse1037; GCN-NEXT:    v_accvgpr_write_b32 a27, v25 ; Reload Reuse1038; GCN-NEXT:    v_accvgpr_write_b32 a26, v26 ; Reload Reuse1039; GCN-NEXT:    v_accvgpr_write_b32 a25, v27 ; Reload Reuse1040; GCN-NEXT:    v_accvgpr_write_b32 a24, v28 ; Reload Reuse1041; GCN-NEXT:    v_accvgpr_write_b32 a23, v29 ; Reload Reuse1042; GCN-NEXT:    v_accvgpr_write_b32 a22, v30 ; Reload Reuse1043; GCN-NEXT:    buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload1044; GCN-NEXT:    buffer_load_dword v1, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload1045; GCN-NEXT:    buffer_load_dword v2, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload1046; GCN-NEXT:    buffer_load_dword v3, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload1047; GCN-NEXT:    buffer_load_dword v4, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload1048; GCN-NEXT:    buffer_load_dword v5, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload1049; GCN-NEXT:    buffer_load_dword v6, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload1050; GCN-NEXT:    buffer_load_dword v7, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload1051; GCN-NEXT:    buffer_load_dword v8, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload1052; GCN-NEXT:    buffer_load_dword v9, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload1053; GCN-NEXT:    buffer_load_dword v10, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload1054; GCN-NEXT:    buffer_load_dword v11, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload1055; GCN-NEXT:    buffer_load_dword v12, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload1056; GCN-NEXT:    buffer_load_dword v13, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload1057; GCN-NEXT:    buffer_load_dword v14, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload1058; GCN-NEXT:    buffer_load_dword v15, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload1059; GCN-NEXT:    buffer_load_dword v16, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload1060; GCN-NEXT:    buffer_load_dword v17, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload1061; GCN-NEXT:    buffer_load_dword v18, off, s[0:3], s32 offset:72 ; 4-byte Folded Reload1062; GCN-NEXT:    buffer_load_dword v19, off, s[0:3], s32 offset:76 ; 4-byte Folded Reload1063; GCN-NEXT:    buffer_load_dword v20, off, s[0:3], s32 offset:80 ; 4-byte Folded Reload1064; GCN-NEXT:    v_accvgpr_read_b32 v21, a31 ; Reload Reuse1065; GCN-NEXT:    v_accvgpr_read_b32 v22, a30 ; Reload Reuse1066; GCN-NEXT:    v_accvgpr_read_b32 v23, a29 ; Reload Reuse1067; GCN-NEXT:    v_accvgpr_read_b32 v24, a28 ; Reload Reuse1068; GCN-NEXT:    v_accvgpr_read_b32 v25, a27 ; Reload Reuse1069; GCN-NEXT:    v_accvgpr_read_b32 v26, a26 ; Reload Reuse1070; GCN-NEXT:    v_accvgpr_read_b32 v27, a25 ; Reload Reuse1071; GCN-NEXT:    v_accvgpr_read_b32 v28, a24 ; Reload Reuse1072; GCN-NEXT:    v_accvgpr_read_b32 v29, a23 ; Reload Reuse1073; GCN-NEXT:    v_accvgpr_read_b32 v30, a22 ; Reload Reuse1074; GCN-NEXT:    s_waitcnt vmcnt(0)1075; GCN-NEXT:    v_accvgpr_read_b32 v31, a21 ; Reload Reuse1076; GCN-NEXT:    ;;#ASMSTART1077; GCN-NEXT:    ; use v[0:31]1078; GCN-NEXT:    ;;#ASMEND1079; GCN-NEXT:    v_accvgpr_read_b32 v63, a20 ; Reload Reuse1080; GCN-NEXT:    v_accvgpr_read_b32 v62, a19 ; Reload Reuse1081; GCN-NEXT:    v_accvgpr_read_b32 v61, a18 ; Reload Reuse1082; GCN-NEXT:    v_accvgpr_read_b32 v60, a17 ; Reload Reuse1083; GCN-NEXT:    v_accvgpr_read_b32 v59, a16 ; Reload Reuse1084; GCN-NEXT:    v_accvgpr_read_b32 v58, a15 ; Reload Reuse1085; GCN-NEXT:    v_accvgpr_read_b32 v57, a14 ; Reload Reuse1086; GCN-NEXT:    v_accvgpr_read_b32 v56, a13 ; Reload Reuse1087; GCN-NEXT:    v_accvgpr_read_b32 v47, a12 ; Reload Reuse1088; GCN-NEXT:    v_accvgpr_read_b32 v46, a11 ; Reload Reuse1089; GCN-NEXT:    v_accvgpr_read_b32 v45, a10 ; Reload Reuse1090; GCN-NEXT:    v_accvgpr_read_b32 v44, a9 ; Reload Reuse1091; GCN-NEXT:    v_accvgpr_read_b32 v43, a8 ; Reload Reuse1092; GCN-NEXT:    v_accvgpr_read_b32 v42, a7 ; Reload Reuse1093; GCN-NEXT:    v_accvgpr_read_b32 v41, a6 ; Reload Reuse1094; GCN-NEXT:    v_accvgpr_read_b32 v40, a1 ; Reload Reuse1095; GCN-NEXT:    s_waitcnt lgkmcnt(0)1096; GCN-NEXT:    s_setpc_b64 s[30:31]1097  %gep.0 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 101098  %gep.1 = getelementptr inbounds [512 x i64], ptr addrspace(3) %lds, i32 0, i32 241099  %av0 = call i64 asm sideeffect "; def $0", "=^VA"()1100  %av1 = call i64 asm sideeffect "; def $0", "=^VA"()1101  %vgpr.def = call { <32 x i32>, <32 x i32> }  asm sideeffect "; def $0", "=${v[0:31]},=${v[32:63]}"()1102  %vgpr.0 = extractvalue { <32 x i32>, <32 x i32> } %vgpr.def, 01103  %vgpr.1 = extractvalue { <32 x i32>, <32 x i32> } %vgpr.def, 11104  store i64 %av0, ptr addrspace(3) %gep.01105  store i64 %av1, ptr addrspace(3) %gep.11106  call void asm sideeffect "; use $0", "{v[0:31]},{v[32:63]}"(<32 x i32> %vgpr.0, <32 x i32> %vgpr.1)1107  ret void1108}1109 1110attributes #0 = { nounwind "amdgpu-waves-per-eu"="10,10" }1111