1; RUN: llc < %s -march=amdgcn -mcpu=tahiti -verify-machineinstrs | FileCheck %s
2; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck %s
3
4; CHECK: {{^}}fconst_f64:
5; CHECK-DAG: s_mov_b32 {{s[0-9]+}}, 0x40140000
6; CHECK-DAG: s_mov_b32 {{s[0-9]+}}, 0
7
8define amdgpu_kernel void @fconst_f64(double addrspace(1)* %out, double addrspace(1)* %in) {
9   %tid = call i32 @llvm.amdgcn.workitem.id.x()
10   %gep = getelementptr inbounds double, double addrspace(1)* %in, i32 %tid
11   %r1 = load double, double addrspace(1)* %gep
12   %r2 = fadd double %r1, 5.000000e+00
13   store double %r2, double addrspace(1)* %out
14   ret void
15}
16
17declare i32 @llvm.amdgcn.workitem.id.x() #1
18
19attributes #0 = { nounwind }
20attributes #1 = { nounwind readnone }
21