1 ; RUN: ./amdgcn_glslc -mcpu=tahiti %s | FileCheck -check-prefix=GCN -check-prefix=FUNC -check-prefix=SI %s
2 ; RUN: ./amdgcn_glslc -mcpu=bonaire %s | FileCheck -check-prefix=GCN -check-prefix=FUNC -check-prefix=CI %s
3 ; RUN: ./amdgcn_glslc -mcpu=tonga %s | FileCheck -check-prefix=GCN -check-prefix=FUNC -check-prefix=CI %s
5 ; Only SI has buggy v_fract and must use v_floor.
6 ; The amdgcn.fract intrinsic can be used only if LLVM passes are able to move it.
8 ; FUNC-LABEL: {{^}}@fract:
11 ; SI-NEXT: v_floor_f32
12 ; SI-NEXT: v_subrev_f32
13 ; CI-NEXT: v_fract_f32
20 gl_FragColor.x = fract(f);