1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck -enable-var-scope -check-prefix=GCN %s
4 define half @known_nnan_extract_vector_elt(float %a, float %b, i32 %idx, half %c) {
5 ; GCN-LABEL: known_nnan_extract_vector_elt:
7 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8 ; GCN-NEXT: v_cvt_pkrtz_f16_f32 v0, v0, v1
9 ; GCN-NEXT: v_lshlrev_b32_e32 v1, 4, v2
10 ; GCN-NEXT: v_lshrrev_b32_e32 v0, v1, v0
11 ; GCN-NEXT: v_add_f16_e32 v1, 1.0, v3
12 ; GCN-NEXT: v_cmp_lt_f16_e32 vcc, v0, v1
13 ; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
14 ; GCN-NEXT: s_setpc_b64 s[30:31]
15 %cvt = call nnan <2 x half> @llvm.amdgcn.cvt.pkrtz(float %a, float %b)
16 %extract = extractelement <2 x half> %cvt, i32 %idx
17 %canon = call half @llvm.canonicalize.f16(half %extract)
18 %nnan.c = fadd nnan nsz half %c, 1.0
19 %cmp = fcmp olt half %extract, %nnan.c
20 %select = select i1 %cmp, half %extract, half %nnan.c
24 declare <2 x half> @llvm.amdgcn.cvt.pkrtz(float, float) #0
25 declare half @llvm.canonicalize.f16(half) #0