annotate llvm/test/CodeGen/AMDGPU/dagcombiner-bug-illegal-vec4-int-to-fp.ll @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; This test is for a bug in
anatofuz
parents:
diff changeset
4 ; DAGCombiner::reduceBuildVecConvertToConvertBuildVec() where
anatofuz
parents:
diff changeset
5 ; the wrong type was being passed to
anatofuz
parents:
diff changeset
6 ; TargetLowering::getOperationAction() when checking the legality of
anatofuz
parents:
diff changeset
7 ; ISD::UINT_TO_FP and ISD::SINT_TO_FP opcodes.
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 ; CHECK: {{^}}sint:
anatofuz
parents:
diff changeset
11 ; CHECK: INT_TO_FLT * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 define amdgpu_kernel void @sint(<4 x float> addrspace(1)* %out, i32 addrspace(1)* %in) {
anatofuz
parents:
diff changeset
14 entry:
anatofuz
parents:
diff changeset
15 %ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
anatofuz
parents:
diff changeset
16 %sint = load i32, i32 addrspace(1) * %in
anatofuz
parents:
diff changeset
17 %conv = sitofp i32 %sint to float
anatofuz
parents:
diff changeset
18 %0 = insertelement <4 x float> undef, float %conv, i32 0
anatofuz
parents:
diff changeset
19 %splat = shufflevector <4 x float> %0, <4 x float> undef, <4 x i32> zeroinitializer
anatofuz
parents:
diff changeset
20 store <4 x float> %splat, <4 x float> addrspace(1)* %out
anatofuz
parents:
diff changeset
21 ret void
anatofuz
parents:
diff changeset
22 }
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 ;CHECK: {{^}}uint:
anatofuz
parents:
diff changeset
25 ;CHECK: UINT_TO_FLT * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 define amdgpu_kernel void @uint(<4 x float> addrspace(1)* %out, i32 addrspace(1)* %in) {
anatofuz
parents:
diff changeset
28 entry:
anatofuz
parents:
diff changeset
29 %ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1
anatofuz
parents:
diff changeset
30 %uint = load i32, i32 addrspace(1) * %in
anatofuz
parents:
diff changeset
31 %conv = uitofp i32 %uint to float
anatofuz
parents:
diff changeset
32 %0 = insertelement <4 x float> undef, float %conv, i32 0
anatofuz
parents:
diff changeset
33 %splat = shufflevector <4 x float> %0, <4 x float> undef, <4 x i32> zeroinitializer
anatofuz
parents:
diff changeset
34 store <4 x float> %splat, <4 x float> addrspace(1)* %out
anatofuz
parents:
diff changeset
35 ret void
anatofuz
parents:
diff changeset
36 }