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 4 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. 7 8; FUNC-LABEL: {{^}}@fract: 9; GCN: main 10; GCN: v_interp_mov 11; SI-NEXT: v_floor_f32 12; SI-NEXT: v_subrev_f32 13; CI-NEXT: v_fract_f32 14; GCN-NEXT: epilog 15 16#shader fs fract 17#version 400 18flat in float f; 19void main() { 20 gl_FragColor.x = fract(f); 21} 22