brintos

brintos / llvm-project-archived public Read only

0
0
Text · 690 B · 337b545 Raw
21 lines · plain
1; RUN: llc < %s -mtriple=amdgcn -mcpu=tahiti | FileCheck %s2; RUN: llc < %s -mtriple=amdgcn -mcpu=tonga | FileCheck %s3 4; CHECK: {{^}}fconst_f64:5; CHECK-DAG: s_mov_b32 {{s[0-9]+}}, 0x401400006; CHECK-DAG: s_mov_b32 {{s[0-9]+}}, 07 8define amdgpu_kernel void @fconst_f64(ptr addrspace(1) %out, ptr addrspace(1) %in) {9   %tid = call i32 @llvm.amdgcn.workitem.id.x()10   %gep = getelementptr inbounds double, ptr addrspace(1) %in, i32 %tid11   %r1 = load double, ptr addrspace(1) %gep12   %r2 = fadd double %r1, 5.000000e+0013   store double %r2, ptr addrspace(1) %out14   ret void15}16 17declare i32 @llvm.amdgcn.workitem.id.x() #118 19attributes #0 = { nounwind }20attributes #1 = { nounwind readnone }21