1; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3
4target triple = "amdgcn--"
5
6; GCN-LABEL: {{^}}main:
7; GCN: BB0_3:
8; GCN-NEXT: s_branch [[LASTBB:BB[0-9]*_[0-9]*]]
9; GCN-NEXT: BB0_
10; GCN: [[LASTBB]]
11; GCN-NEXT: .Lfunc_end0:
12; ModuleID = 'bugpoint-reduced-simplified.bc'
13target triple = "amdgcn--"
14
15define <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float }> @main([9 x <16 x i8>] addrspace(2)* byval, [17 x <16 x i8>] addrspace(2)* byval, [17 x <8 x i32>] addrspace(2)* byval, i32 addrspace(2)* byval, float inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, i32, i32, float, i32) #0 {
16main_body:
17  %p83 = call float @llvm.SI.fs.interp(i32 1, i32 0, i32 %5, <2 x i32> %7)
18  %p87 = fmul float undef, %p83
19  %p88 = fadd float %p87, undef
20  %p93 = fadd float %p88, undef
21  %p97 = fmul float %p93, undef
22  %p102 = fsub float %p97, undef
23  %p104 = fmul float %p102, undef
24  %p106 = fadd float 0.000000e+00, %p104
25  %p108 = fadd float undef, %p106
26  br i1 undef, label %ENDIF69, label %ELSE
27
28ELSE:                                             ; preds = %main_body
29  %p124 = fmul float %p108, %p108
30  %p125 = fsub float %p124, undef
31  %p126 = fcmp olt float %p125, 0.000000e+00
32  br i1 %p126, label %ENDIF69, label %ELSE41
33
34ELSE41:                                           ; preds = %ELSE
35  unreachable
36
37ENDIF69:                                          ; preds = %ELSE, %main_body
38  ret <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float }> undef
39}
40
41; Function Attrs: nounwind readnone
42declare float @llvm.SI.load.const(<16 x i8>, i32) #1
43
44; Function Attrs: nounwind readnone
45declare float @llvm.SI.fs.interp(i32, i32, i32, <2 x i32>) #1
46
47; Function Attrs: nounwind readnone
48declare float @llvm.fabs.f32(float) #1
49
50; Function Attrs: nounwind readnone
51declare float @llvm.sqrt.f32(float) #1
52
53; Function Attrs: nounwind readnone
54declare float @llvm.floor.f32(float) #1
55
56attributes #0 = { "InitialPSInputAddr"="36983" "ShaderType"="0" }
57attributes #1 = { nounwind readnone }
58