107 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx908 %s -o - | FileCheck %s3 4define float @test_fmamix_constant_bus_violation_sss(i32 inreg %val.0, i32 inreg %val.1, i32 inreg %val.2) #0 {5; CHECK-LABEL: test_fmamix_constant_bus_violation_sss:6; CHECK: ; %bb.0:7; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)8; CHECK-NEXT: s_lshr_b32 s5, s17, 169; CHECK-NEXT: s_lshr_b32 s6, s18, 1610; CHECK-NEXT: s_lshr_b32 s4, s16, 1611; CHECK-NEXT: v_mov_b32_e32 v0, s512; CHECK-NEXT: v_mov_b32_e32 v1, s613; CHECK-NEXT: v_fma_mix_f32 v0, s4, v0, v1 op_sel_hi:[1,1,1]14; CHECK-NEXT: s_setpc_b64 s[30:31]15 %lshr.0 = lshr i32 %val.0, 1616 %lshr.1 = lshr i32 %val.1, 1617 %lshr.2 = lshr i32 %val.2, 1618 %trunc.0 = trunc i32 %lshr.0 to i1619 %trunc.1 = trunc i32 %lshr.1 to i1620 %trunc.2 = trunc i32 %lshr.2 to i1621 %cast.0 = bitcast i16 %trunc.0 to half22 %cast.1 = bitcast i16 %trunc.1 to half23 %cast.2 = bitcast i16 %trunc.2 to half24 %fpext.0 = fpext half %cast.0 to float25 %fpext.1 = fpext half %cast.1 to float26 %fpext.2 = fpext half %cast.2 to float27 %fma = call float @llvm.fma.f32(float %fpext.0, float %fpext.1, float %fpext.2)28 ret float %fma29}30 31define float @test_fmamix_constant_bus_violation_ssv(i32 inreg %val.0, i32 inreg %val.1, i32 %val.2) #0 {32; CHECK-LABEL: test_fmamix_constant_bus_violation_ssv:33; CHECK: ; %bb.0:34; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)35; CHECK-NEXT: s_lshr_b32 s5, s17, 1636; CHECK-NEXT: s_lshr_b32 s4, s16, 1637; CHECK-NEXT: v_mov_b32_e32 v1, s538; CHECK-NEXT: v_fma_mix_f32 v0, s4, v1, v0 op_sel:[0,0,1] op_sel_hi:[1,1,1]39; CHECK-NEXT: s_setpc_b64 s[30:31]40 %lshr.0 = lshr i32 %val.0, 1641 %lshr.1 = lshr i32 %val.1, 1642 %lshr.2 = lshr i32 %val.2, 1643 %trunc.0 = trunc i32 %lshr.0 to i1644 %trunc.1 = trunc i32 %lshr.1 to i1645 %trunc.2 = trunc i32 %lshr.2 to i1646 %cast.0 = bitcast i16 %trunc.0 to half47 %cast.1 = bitcast i16 %trunc.1 to half48 %cast.2 = bitcast i16 %trunc.2 to half49 %fpext.0 = fpext half %cast.0 to float50 %fpext.1 = fpext half %cast.1 to float51 %fpext.2 = fpext half %cast.2 to float52 %fma = call float @llvm.fma.f32(float %fpext.0, float %fpext.1, float %fpext.2)53 ret float %fma54}55 56define float @test_fmamix_constant_bus_violation_svs(i32 inreg %val.0, i32 %val.1, i32 inreg %val.2) #0 {57; CHECK-LABEL: test_fmamix_constant_bus_violation_svs:58; CHECK: ; %bb.0:59; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)60; CHECK-NEXT: s_lshr_b32 s5, s17, 1661; CHECK-NEXT: s_lshr_b32 s4, s16, 1662; CHECK-NEXT: v_mov_b32_e32 v1, s563; CHECK-NEXT: v_fma_mix_f32 v0, s4, v0, v1 op_sel:[0,1,0] op_sel_hi:[1,1,1]64; CHECK-NEXT: s_setpc_b64 s[30:31]65 %lshr.0 = lshr i32 %val.0, 1666 %lshr.1 = lshr i32 %val.1, 1667 %lshr.2 = lshr i32 %val.2, 1668 %trunc.0 = trunc i32 %lshr.0 to i1669 %trunc.1 = trunc i32 %lshr.1 to i1670 %trunc.2 = trunc i32 %lshr.2 to i1671 %cast.0 = bitcast i16 %trunc.0 to half72 %cast.1 = bitcast i16 %trunc.1 to half73 %cast.2 = bitcast i16 %trunc.2 to half74 %fpext.0 = fpext half %cast.0 to float75 %fpext.1 = fpext half %cast.1 to float76 %fpext.2 = fpext half %cast.2 to float77 %fma = call float @llvm.fma.f32(float %fpext.0, float %fpext.1, float %fpext.2)78 ret float %fma79}80 81define float @test_fmamix_constant_bus_violation_vss(i32 %val.0, i32 inreg %val.1, i32 inreg %val.2) #0 {82; CHECK-LABEL: test_fmamix_constant_bus_violation_vss:83; CHECK: ; %bb.0:84; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)85; CHECK-NEXT: s_lshr_b32 s5, s17, 1686; CHECK-NEXT: s_lshr_b32 s4, s16, 1687; CHECK-NEXT: v_mov_b32_e32 v1, s588; CHECK-NEXT: v_fma_mix_f32 v0, v0, s4, v1 op_sel:[1,0,0] op_sel_hi:[1,1,1]89; CHECK-NEXT: s_setpc_b64 s[30:31]90 %lshr.0 = lshr i32 %val.0, 1691 %lshr.1 = lshr i32 %val.1, 1692 %lshr.2 = lshr i32 %val.2, 1693 %trunc.0 = trunc i32 %lshr.0 to i1694 %trunc.1 = trunc i32 %lshr.1 to i1695 %trunc.2 = trunc i32 %lshr.2 to i1696 %cast.0 = bitcast i16 %trunc.0 to half97 %cast.1 = bitcast i16 %trunc.1 to half98 %cast.2 = bitcast i16 %trunc.2 to half99 %fpext.0 = fpext half %cast.0 to float100 %fpext.1 = fpext half %cast.1 to float101 %fpext.2 = fpext half %cast.2 to float102 %fma = call float @llvm.fma.f32(float %fpext.0, float %fpext.1, float %fpext.2)103 ret float %fma104}105 106attributes #0 = { "denormal-fp-math-f32"="preserve-sign" }107