105 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s3 4define float @v_constained_fma_f32_fpexcept_strict(float %x, float %y, float %z) #0 {5; GCN-LABEL: v_constained_fma_f32_fpexcept_strict:6; GCN: ; %bb.0:7; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)8; GCN-NEXT: v_fma_f32 v0, v0, v1, v29; GCN-NEXT: s_setpc_b64 s[30:31]10 %val = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")11 ret float %val12}13 14define <2 x float> @v_constained_fma_v2f32_fpexcept_strict(<2 x float> %x, <2 x float> %y, <2 x float> %z) #0 {15; GCN-LABEL: v_constained_fma_v2f32_fpexcept_strict:16; GCN: ; %bb.0:17; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)18; GCN-NEXT: v_fma_f32 v0, v0, v2, v419; GCN-NEXT: v_fma_f32 v1, v1, v3, v520; GCN-NEXT: s_setpc_b64 s[30:31]21 %val = call <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float> %x, <2 x float> %y, <2 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")22 ret <2 x float> %val23}24 25define <3 x float> @v_constained_fma_v3f32_fpexcept_strict(<3 x float> %x, <3 x float> %y, <3 x float> %z) #0 {26; GCN-LABEL: v_constained_fma_v3f32_fpexcept_strict:27; GCN: ; %bb.0:28; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)29; GCN-NEXT: v_fma_f32 v0, v0, v3, v630; GCN-NEXT: v_fma_f32 v1, v1, v4, v731; GCN-NEXT: v_fma_f32 v2, v2, v5, v832; GCN-NEXT: s_setpc_b64 s[30:31]33 %val = call <3 x float> @llvm.experimental.constrained.fma.v3f32(<3 x float> %x, <3 x float> %y, <3 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")34 ret <3 x float> %val35}36 37define <4 x float> @v_constained_fma_v4f32_fpexcept_strict(<4 x float> %x, <4 x float> %y, <4 x float> %z) #0 {38; GCN-LABEL: v_constained_fma_v4f32_fpexcept_strict:39; GCN: ; %bb.0:40; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)41; GCN-NEXT: v_fma_f32 v0, v0, v4, v842; GCN-NEXT: v_fma_f32 v1, v1, v5, v943; GCN-NEXT: v_fma_f32 v2, v2, v6, v1044; GCN-NEXT: v_fma_f32 v3, v3, v7, v1145; GCN-NEXT: s_setpc_b64 s[30:31]46 %val = call <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float> %x, <4 x float> %y, <4 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")47 ret <4 x float> %val48}49 50define float @v_constained_fma_f32_fpexcept_strict_fneg(float %x, float %y, float %z) #0 {51; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fneg:52; GCN: ; %bb.0:53; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)54; GCN-NEXT: v_fma_f32 v0, v0, v1, -v255; GCN-NEXT: s_setpc_b64 s[30:31]56 %neg.z = fneg float %z57 %val = call float @llvm.experimental.constrained.fma.f32(float %x, float %y, float %neg.z, metadata !"round.tonearest", metadata !"fpexcept.strict")58 ret float %val59}60 61define float @v_constained_fma_f32_fpexcept_strict_fneg_fneg(float %x, float %y, float %z) #0 {62; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fneg_fneg:63; GCN: ; %bb.0:64; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)65; GCN-NEXT: v_fma_f32 v0, -v0, -v1, v266; GCN-NEXT: s_setpc_b64 s[30:31]67 %neg.x = fneg float %x68 %neg.y = fneg float %y69 %val = call float @llvm.experimental.constrained.fma.f32(float %neg.x, float %neg.y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")70 ret float %val71}72 73define float @v_constained_fma_f32_fpexcept_strict_fabs_fabs(float %x, float %y, float %z) #0 {74; GCN-LABEL: v_constained_fma_f32_fpexcept_strict_fabs_fabs:75; GCN: ; %bb.0:76; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)77; GCN-NEXT: v_fma_f32 v0, |v0|, |v1|, v278; GCN-NEXT: s_setpc_b64 s[30:31]79 %neg.x = call float @llvm.fabs.f32(float %x) #080 %neg.y = call float @llvm.fabs.f32(float %y) #081 %val = call float @llvm.experimental.constrained.fma.f32(float %neg.x, float %neg.y, float %z, metadata !"round.tonearest", metadata !"fpexcept.strict")82 ret float %val83}84 85define <2 x float> @v_constained_fma_v2f32_fpexcept_strict_fneg_fneg(<2 x float> %x, <2 x float> %y, <2 x float> %z) #0 {86; GCN-LABEL: v_constained_fma_v2f32_fpexcept_strict_fneg_fneg:87; GCN: ; %bb.0:88; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)89; GCN-NEXT: v_fma_f32 v0, -v0, -v2, v490; GCN-NEXT: v_fma_f32 v1, -v1, -v3, v591; GCN-NEXT: s_setpc_b64 s[30:31]92 %neg.x = fneg <2 x float> %x93 %neg.y = fneg <2 x float> %y94 %val = call <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float> %neg.x, <2 x float> %neg.y, <2 x float> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")95 ret <2 x float> %val96}97 98declare float @llvm.fabs.f32(float)99declare float @llvm.experimental.constrained.fma.f32(float, float, float, metadata, metadata)100declare <2 x float> @llvm.experimental.constrained.fma.v2f32(<2 x float>, <2 x float>, <2 x float>, metadata, metadata)101declare <3 x float> @llvm.experimental.constrained.fma.v3f32(<3 x float>, <3 x float>, <3 x float>, metadata, metadata)102declare <4 x float> @llvm.experimental.constrained.fma.v4f32(<4 x float>, <4 x float>, <4 x float>, metadata, metadata)103 104attributes #0 = { strictfp }105