brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1001 B · 249038b Raw
23 lines · plain
1; RUN: llc -debug-only=machine-scheduler -mtriple=amdgcn-- %s -o - 2>&1| FileCheck -check-prefix=DEBUG %s2; REQUIRES: asserts3 4; Verify that the extload generated from %eval has the default5; alignment size (2) corresponding to the underlying memory size (i16)6; size and not 4 corresponding to the sign-extended size (i32).7 8; DEBUG: {{^}}# Machine code for function extload_align:9; DEBUG: (volatile load (s16) from %ir.a, addrspace 5)10; DEBUG: {{^}}# End machine code for function extload_align.11 12define amdgpu_kernel void @extload_align(ptr addrspace(5) %out, i32 %index) #0 {13  %v0 = alloca [4 x i16], addrspace(5)14  %a2 = getelementptr inbounds [4 x i16], ptr addrspace(5) %v0, i32 0, i32 115  store volatile i16 0, ptr addrspace(5) %v016  store volatile i16 1, ptr addrspace(5) %a217  %a = getelementptr inbounds [4 x i16], ptr addrspace(5) %v0, i32 0, i32 %index18  %val = load volatile i16, ptr addrspace(5) %a19  %eval = sext i16 %val to i3220  store i32 %eval, ptr addrspace(5) %out21  ret void22}23