brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f5bf179 Raw
37 lines · plain
1;RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s2 3; This test is for a bug in4; DAGCombiner::reduceBuildVecConvertToConvertBuildVec() where5; the wrong type was being passed to6; TargetLowering::getOperationAction() when checking the legality of7; ISD::UINT_TO_FP and ISD::SINT_TO_FP opcodes.8 9 10; CHECK: {{^}}sint:11; CHECK: INT_TO_FLT * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}12 13define amdgpu_kernel void @sint(ptr addrspace(1) %out, ptr addrspace(1) %in) {14entry:15  %ptr = getelementptr i32, ptr addrspace(1) %in, i32 116  %sint = load i32, ptr addrspace(1) %in17  %conv = sitofp i32 %sint to float18  %0 = insertelement <4 x float> poison, float %conv, i32 019  %splat = shufflevector <4 x float> %0, <4 x float> poison, <4 x i32> zeroinitializer20  store <4 x float> %splat, ptr addrspace(1) %out21  ret void22}23 24;CHECK: {{^}}uint:25;CHECK: UINT_TO_FLT * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}26 27define amdgpu_kernel void @uint(ptr addrspace(1) %out, ptr addrspace(1) %in) {28entry:29  %ptr = getelementptr i32, ptr addrspace(1) %in, i32 130  %uint = load i32, ptr addrspace(1) %in31  %conv = uitofp i32 %uint to float32  %0 = insertelement <4 x float> poison, float %conv, i32 033  %splat = shufflevector <4 x float> %0, <4 x float> poison, <4 x i32> zeroinitializer34  store <4 x float> %splat, ptr addrspace(1) %out35  ret void36}37