|
1 | 1 | # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 |
2 | 2 | # RUN: llc -mtriple=amdgcn -mcpu=gfx942 -run-pass=si-fix-sgpr-copies -o - %s | FileCheck --check-prefix=GCN %s |
3 | | ---- | |
4 | | - source_filename = "test1.ll" |
5 | | - target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9" |
6 | | - target triple = "amdgcn" |
7 | | - |
8 | | - define amdgpu_kernel void @test_should_convert_to_v_readfirstlane_b32(float %fval, i32 %arg1, i32 %arg2, ptr addrspace(4) %out) #0 { |
9 | | - entry: |
10 | | - %test_should_convert_to_v_readfirstlane_b32.kernarg.segment = call nonnull align 16 dereferenceable(280) ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr() |
11 | | - %fval.kernarg.offset = getelementptr inbounds i8, ptr addrspace(4) %test_should_convert_to_v_readfirstlane_b32.kernarg.segment, i64 36, !amdgpu.uniform !0 |
12 | | - %0 = load <3 x i32>, ptr addrspace(4) %fval.kernarg.offset, align 4, !invariant.load !0 |
13 | | - %fval.load1 = extractelement <3 x i32> %0, i32 0 |
14 | | - %1 = bitcast i32 %fval.load1 to float |
15 | | - %arg1.load2 = extractelement <3 x i32> %0, i32 1 |
16 | | - %arg2.load3 = extractelement <3 x i32> %0, i32 2 |
17 | | - %conv = fptoui float %1 to i32 |
18 | | - %shl = shl i32 %conv, 16 |
19 | | - %or = or i32 %shl, %arg1.load2 |
20 | | - %and = and i32 %or, %arg2.load3 |
21 | | - %shr = lshr i32 %and, 2 |
22 | | - %sgpr128_0 = insertelement <4 x i32> undef, i32 %shr, i32 0 |
23 | | - %sgpr128_1 = insertelement <4 x i32> %sgpr128_0, i32 %or, i32 1 |
24 | | - %sgpr128_2 = insertelement <4 x i32> %sgpr128_1, i32 %and, i32 2 |
25 | | - %sgpr128_3 = insertelement <4 x i32> %sgpr128_2, i32 %shr, i32 3 |
26 | | - call void @llvm.amdgcn.raw.buffer.store.i32(i32 %arg1.load2, <4 x i32> %sgpr128_3, i32 0, i32 0, i32 2) |
27 | | - ret void |
28 | | - } |
29 | | - |
30 | | - declare void @llvm.amdgcn.raw.buffer.store.i32(i32, <4 x i32>, i32, i32, i32 immarg) #1 |
31 | | - |
32 | | - declare noundef align 4 ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr() #2 |
33 | | - |
34 | | - attributes #0 = { "target-cpu"="gfx942" } |
35 | | - attributes #1 = { nocallback nofree nosync nounwind willreturn memory(write) "target-cpu"="gfx942" } |
36 | | - attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } |
37 | | - |
38 | | - !0 = !{} |
39 | | -... |
40 | 3 | --- |
41 | 4 | name: test_should_convert_to_v_readfirstlane_b32 |
42 | 5 | alignment: 1 |
|
0 commit comments