1bf215546Sopenharmony_ci; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ci; FUNC-LABEL: {{^}}@sqrt:
4bf215546Sopenharmony_ci; GCN: main
5bf215546Sopenharmony_ci; GCN: v_interp_mov
6bf215546Sopenharmony_ci; GCN-NEXT: v_sqrt_f32
7bf215546Sopenharmony_ci; GCN-NEXT: epilog
8bf215546Sopenharmony_ci
9bf215546Sopenharmony_ci#shader fs sqrt
10bf215546Sopenharmony_ci#version 400
11bf215546Sopenharmony_ciflat in float f;
12bf215546Sopenharmony_civoid main() {
13bf215546Sopenharmony_ci    gl_FragColor.x = sqrt(f);
14bf215546Sopenharmony_ci}
15bf215546Sopenharmony_ci
16bf215546Sopenharmony_ci
17bf215546Sopenharmony_ci; FUNC-LABEL: {{^}}@inv_sqrt:
18bf215546Sopenharmony_ci; GCN: main
19bf215546Sopenharmony_ci; GCN: v_interp_mov
20bf215546Sopenharmony_ci; GCN-NEXT: v_rsq_f32
21bf215546Sopenharmony_ci; GCN-NEXT: epilog
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_ci#shader fs inv_sqrt
24bf215546Sopenharmony_ci#version 400
25bf215546Sopenharmony_ciflat in float f;
26bf215546Sopenharmony_civoid main() {
27bf215546Sopenharmony_ci    gl_FragColor.x = 1 / sqrt(f);
28bf215546Sopenharmony_ci}
29bf215546Sopenharmony_ci
30bf215546Sopenharmony_ci
31bf215546Sopenharmony_ci; FUNC-LABEL: {{^}}@rsq:
32bf215546Sopenharmony_ci; GCN: main
33bf215546Sopenharmony_ci; GCN: v_interp_mov
34bf215546Sopenharmony_ci; GCN-NEXT: v_rsq_f32
35bf215546Sopenharmony_ci; GCN-NEXT: epilog
36bf215546Sopenharmony_ci
37bf215546Sopenharmony_ci#shader fs rsq
38bf215546Sopenharmony_ci#version 400
39bf215546Sopenharmony_ciflat in float f;
40bf215546Sopenharmony_civoid main() {
41bf215546Sopenharmony_ci    gl_FragColor.x = inversesqrt(f);
42bf215546Sopenharmony_ci}
43bf215546Sopenharmony_ci
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_ci; FUNC-LABEL: {{^}}@inv_rsq:
46bf215546Sopenharmony_ci; GCN: main
47bf215546Sopenharmony_ci; GCN: v_interp_mov
48bf215546Sopenharmony_ci; GCN-NEXT: v_sqrt_f32
49bf215546Sopenharmony_ci; GCN-NEXT: epilog
50bf215546Sopenharmony_ci
51bf215546Sopenharmony_ci#shader fs inv_rsq
52bf215546Sopenharmony_ci#version 400
53bf215546Sopenharmony_ciflat in float f;
54bf215546Sopenharmony_civoid main() {
55bf215546Sopenharmony_ci    gl_FragColor.x = 1 / inversesqrt(f);
56bf215546Sopenharmony_ci}
57