1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer %s -o - | FileCheck -check-prefix=SI %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck -check-prefix=VI %s
6 name: test_rsq_clamp_flags_ieee_on_f32
7 tracksRegLiveness: true
16 ; SI-LABEL: name: test_rsq_clamp_flags_ieee_on_f32
19 ; SI-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
20 ; SI-NEXT: [[INT:%[0-9]+]]:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq.clamp), [[COPY]](s32)
21 ; SI-NEXT: $vgpr0 = COPY [[INT]](s32)
22 ; VI-LABEL: name: test_rsq_clamp_flags_ieee_on_f32
25 ; VI-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
26 ; VI-NEXT: [[INT:%[0-9]+]]:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq), [[COPY]](s32)
27 ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0x47EFFFFFE0000000
28 ; VI-NEXT: [[FMINNUM_IEEE:%[0-9]+]]:_(s32) = nnan ninf nsz G_FMINNUM_IEEE [[INT]], [[C]]
29 ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_FCONSTANT float 0xC7EFFFFFE0000000
30 ; VI-NEXT: [[FMAXNUM_IEEE:%[0-9]+]]:_(s32) = nnan ninf nsz G_FMAXNUM_IEEE [[FMINNUM_IEEE]], [[C1]]
31 ; VI-NEXT: $vgpr0 = COPY [[FMAXNUM_IEEE]](s32)
32 %0:_(s32) = COPY $vgpr0
33 %1:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq.clamp), %0
38 name: test_rsq_clamp_flags_ieee_off_f32
39 tracksRegLiveness: true
48 ; SI-LABEL: name: test_rsq_clamp_flags_ieee_off_f32
51 ; SI-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
52 ; SI-NEXT: [[INT:%[0-9]+]]:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq.clamp), [[COPY]](s32)
53 ; SI-NEXT: $vgpr0 = COPY [[INT]](s32)
54 ; VI-LABEL: name: test_rsq_clamp_flags_ieee_off_f32
57 ; VI-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
58 ; VI-NEXT: [[INT:%[0-9]+]]:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq), [[COPY]](s32)
59 ; VI-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0x47EFFFFFE0000000
60 ; VI-NEXT: [[FMINNUM:%[0-9]+]]:_(s32) = nnan ninf nsz G_FMINNUM [[INT]], [[C]]
61 ; VI-NEXT: [[C1:%[0-9]+]]:_(s32) = G_FCONSTANT float 0xC7EFFFFFE0000000
62 ; VI-NEXT: [[FMAXNUM:%[0-9]+]]:_(s32) = nnan ninf nsz G_FMAXNUM [[FMINNUM]], [[C1]]
63 ; VI-NEXT: $vgpr0 = COPY [[FMAXNUM]](s32)
64 %0:_(s32) = COPY $vgpr0
65 %1:_(s32) = nnan ninf nsz G_INTRINSIC intrinsic(@llvm.amdgcn.rsq.clamp), %0