3171 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx700 < %s | FileCheck -check-prefixes=GFX7,GFX7-SDAG %s3; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx700 < %s | FileCheck -check-prefixes=GFX7,GFX7-GISEL %s4; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx801 < %s | FileCheck -check-prefixes=GFX8,GFX8-SDAG %s5; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx801 < %s | FileCheck -check-prefixes=GFX8,GFX8-GISEL %s6; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx942 < %s | FileCheck -check-prefixes=GFX9,GFX9-SDAG %s7; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx942 < %s | FileCheck -check-prefixes=GFX9,GFX9-GISEL %s8; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10,GFX10-SDAG %s9; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10,GFX10-GISEL %s10; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX11,GFX11-SDAG,GFX11-SDAG-TRUE16 %s11; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX11,GFX11-SDAG,GFX11-SDAG-FAKE16 %s12; FIXME-TRUE16. enable gisel13; XUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX11,GFX11-GISEL,GFX11-GISEL-TRUE16 %s14; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX11,GFX11-GISEL,GFX11-GISEL-FAKE16 %s15; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX12,GFX12-SDAG,GFX12-SDAG-TRUE16 %s16; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX12,GFX12-SDAG,GFX12-SDAG-FAKE16 %s17; XUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1200 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GFX12,GFX12-GISEL,GFX12-GISEL-TRUE16 %s18; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1200 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GFX12,GFX12-GISEL,GFX12-GISEL-FAKE16 %s19 20define i8 @test_vector_reduce_or_v2i8(<2 x i8> %v) {21; GFX7-SDAG-LABEL: test_vector_reduce_or_v2i8:22; GFX7-SDAG: ; %bb.0: ; %entry23; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)24; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v125; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v026; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xff00, v027; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]28;29; GFX7-GISEL-LABEL: test_vector_reduce_or_v2i8:30; GFX7-GISEL: ; %bb.0: ; %entry31; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)32; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v133; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]34;35; GFX8-SDAG-LABEL: test_vector_reduce_or_v2i8:36; GFX8-SDAG: ; %bb.0: ; %entry37; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)38; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v139; GFX8-SDAG-NEXT: v_or_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_140; GFX8-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD41; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]42;43; GFX8-GISEL-LABEL: test_vector_reduce_or_v2i8:44; GFX8-GISEL: ; %bb.0: ; %entry45; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)46; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v147; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]48;49; GFX9-SDAG-LABEL: test_vector_reduce_or_v2i8:50; GFX9-SDAG: ; %bb.0: ; %entry51; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)52; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v153; GFX9-SDAG-NEXT: v_or_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_154; GFX9-SDAG-NEXT: s_nop 055; GFX9-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD56; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]57;58; GFX9-GISEL-LABEL: test_vector_reduce_or_v2i8:59; GFX9-GISEL: ; %bb.0: ; %entry60; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)61; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v162; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]63;64; GFX10-SDAG-LABEL: test_vector_reduce_or_v2i8:65; GFX10-SDAG: ; %bb.0: ; %entry66; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)67; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v168; GFX10-SDAG-NEXT: v_or_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_169; GFX10-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD70; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]71;72; GFX10-GISEL-LABEL: test_vector_reduce_or_v2i8:73; GFX10-GISEL: ; %bb.0: ; %entry74; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)75; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v176; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]77;78; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v2i8:79; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry80; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)81; GFX11-SDAG-TRUE16-NEXT: v_lshrrev_b16 v0.h, 8, v1.l82; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l83; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)84; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v1.l, v0.h85; GFX11-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l86; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)87; GFX11-SDAG-TRUE16-NEXT: v_lshlrev_b16 v0.h, 8, v0.h88; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h89; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]90;91; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v2i8:92; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry93; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)94; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b16 v2, 8, v195; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v196; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)97; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v298; GFX11-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v099; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)100; GFX11-SDAG-FAKE16-NEXT: v_lshlrev_b16 v1, 8, v1101; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1102; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]103;104; GFX11-GISEL-LABEL: test_vector_reduce_or_v2i8:105; GFX11-GISEL: ; %bb.0: ; %entry106; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)107; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v1108; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]109;110; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v2i8:111; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry112; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0113; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0114; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0115; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0116; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0117; GFX12-SDAG-TRUE16-NEXT: v_lshrrev_b16 v0.h, 8, v1.l118; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l119; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)120; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v1.l, v0.h121; GFX12-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l122; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)123; GFX12-SDAG-TRUE16-NEXT: v_lshlrev_b16 v0.h, 8, v0.h124; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h125; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]126;127; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v2i8:128; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry129; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0130; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0131; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0132; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0133; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0134; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b16 v2, 8, v1135; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1136; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)137; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v2138; GFX12-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0139; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)140; GFX12-SDAG-FAKE16-NEXT: v_lshlrev_b16 v1, 8, v1141; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1142; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]143;144; GFX12-GISEL-LABEL: test_vector_reduce_or_v2i8:145; GFX12-GISEL: ; %bb.0: ; %entry146; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0147; GFX12-GISEL-NEXT: s_wait_expcnt 0x0148; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0149; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0150; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0151; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v1152; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]153entry:154 %res = call i8 @llvm.vector.reduce.or.v2i8(<2 x i8> %v)155 ret i8 %res156}157 158define i8 @test_vector_reduce_or_v3i8(<3 x i8> %v) {159; GFX7-SDAG-LABEL: test_vector_reduce_or_v3i8:160; GFX7-SDAG: ; %bb.0: ; %entry161; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)162; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v2163; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1164; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]165;166; GFX7-GISEL-LABEL: test_vector_reduce_or_v3i8:167; GFX7-GISEL: ; %bb.0: ; %entry168; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)169; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v1170; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v2171; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]172;173; GFX8-SDAG-LABEL: test_vector_reduce_or_v3i8:174; GFX8-SDAG: ; %bb.0: ; %entry175; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)176; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v2177; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v1178; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]179;180; GFX8-GISEL-LABEL: test_vector_reduce_or_v3i8:181; GFX8-GISEL: ; %bb.0: ; %entry182; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)183; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v1184; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v2185; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]186;187; GFX9-SDAG-LABEL: test_vector_reduce_or_v3i8:188; GFX9-SDAG: ; %bb.0: ; %entry189; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)190; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v2191; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v1192; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]193;194; GFX9-GISEL-LABEL: test_vector_reduce_or_v3i8:195; GFX9-GISEL: ; %bb.0: ; %entry196; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)197; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2198; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]199;200; GFX10-SDAG-LABEL: test_vector_reduce_or_v3i8:201; GFX10-SDAG: ; %bb.0: ; %entry202; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)203; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v2204; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v1205; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]206;207; GFX10-GISEL-LABEL: test_vector_reduce_or_v3i8:208; GFX10-GISEL: ; %bb.0: ; %entry209; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)210; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2211; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]212;213; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v3i8:214; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry215; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)216; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v2.l217; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)218; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l219; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]220;221; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v3i8:222; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry223; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)224; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2225; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)226; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1227; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]228;229; GFX11-GISEL-LABEL: test_vector_reduce_or_v3i8:230; GFX11-GISEL: ; %bb.0: ; %entry231; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)232; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2233; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]234;235; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v3i8:236; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry237; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0238; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0239; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0240; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0241; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0242; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v2.l243; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)244; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l245; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]246;247; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v3i8:248; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry249; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0250; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0251; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0252; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0253; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0254; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2255; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)256; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1257; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]258;259; GFX12-GISEL-LABEL: test_vector_reduce_or_v3i8:260; GFX12-GISEL: ; %bb.0: ; %entry261; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0262; GFX12-GISEL-NEXT: s_wait_expcnt 0x0263; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0264; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0265; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0266; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2267; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]268entry:269 %res = call i8 @llvm.vector.reduce.or.v3i8(<3 x i8> %v)270 ret i8 %res271}272 273define i8 @test_vector_reduce_or_v4i8(<4 x i8> %v) {274; GFX7-SDAG-LABEL: test_vector_reduce_or_v4i8:275; GFX7-SDAG: ; %bb.0: ; %entry276; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)277; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v3278; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v2279; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1280; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0281; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]282;283; GFX7-GISEL-LABEL: test_vector_reduce_or_v4i8:284; GFX7-GISEL: ; %bb.0: ; %entry285; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)286; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v2287; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v3288; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v1289; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xff, v0290; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff00, v0291; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0292; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0293; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]294;295; GFX8-SDAG-LABEL: test_vector_reduce_or_v4i8:296; GFX8-SDAG: ; %bb.0: ; %entry297; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)298; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v3299; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v2300; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v1301; GFX8-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0302; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]303;304; GFX8-GISEL-LABEL: test_vector_reduce_or_v4i8:305; GFX8-GISEL: ; %bb.0: ; %entry306; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)307; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v2308; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v3309; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v1310; GFX8-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00311; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD312; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0313; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0314; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]315;316; GFX9-SDAG-LABEL: test_vector_reduce_or_v4i8:317; GFX9-SDAG: ; %bb.0: ; %entry318; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)319; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v3320; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v2321; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v1322; GFX9-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0323; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]324;325; GFX9-GISEL-LABEL: test_vector_reduce_or_v4i8:326; GFX9-GISEL: ; %bb.0: ; %entry327; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)328; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v3329; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1330; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff331; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff00332; GFX9-GISEL-NEXT: v_and_or_b32 v0, v0, v1, v2333; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff0000334; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff000000335; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2336; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]337;338; GFX10-SDAG-LABEL: test_vector_reduce_or_v4i8:339; GFX10-SDAG: ; %bb.0: ; %entry340; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)341; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v3342; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v2343; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v1344; GFX10-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0345; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]346;347; GFX10-GISEL-LABEL: test_vector_reduce_or_v4i8:348; GFX10-GISEL: ; %bb.0: ; %entry349; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)350; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v3351; GFX10-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00352; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1353; GFX10-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000354; GFX10-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3355; GFX10-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1356; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]357;358; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v4i8:359; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry360; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)361; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v1.l, v3.l362; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v2.l363; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)364; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h365; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l366; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]367;368; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v4i8:369; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry370; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)371; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3372; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2373; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)374; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1375; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0376; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]377;378; GFX11-GISEL-LABEL: test_vector_reduce_or_v4i8:379; GFX11-GISEL: ; %bb.0: ; %entry380; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)381; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v3382; GFX11-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00383; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)384; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1385; GFX11-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000386; GFX11-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3387; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)388; GFX11-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1389; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]390;391; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v4i8:392; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry393; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0394; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0395; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0396; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0397; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0398; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v1.l, v3.l399; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v2.l400; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)401; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h402; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l403; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]404;405; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v4i8:406; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry407; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0408; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0409; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0410; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0411; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0412; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3413; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2414; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)415; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1416; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0417; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]418;419; GFX12-GISEL-LABEL: test_vector_reduce_or_v4i8:420; GFX12-GISEL: ; %bb.0: ; %entry421; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0422; GFX12-GISEL-NEXT: s_wait_expcnt 0x0423; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0424; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0425; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0426; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v3427; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00428; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)429; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1430; GFX12-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000431; GFX12-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3432; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)433; GFX12-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1434; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]435entry:436 %res = call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %v)437 ret i8 %res438}439 440define i8 @test_vector_reduce_or_v8i8(<8 x i8> %v) {441; GFX7-SDAG-LABEL: test_vector_reduce_or_v8i8:442; GFX7-SDAG: ; %bb.0: ; %entry443; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)444; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v6445; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v4446; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v7447; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v5448; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v3449; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v2450; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1451; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0452; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]453;454; GFX7-GISEL-LABEL: test_vector_reduce_or_v8i8:455; GFX7-GISEL: ; %bb.0: ; %entry456; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)457; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v4458; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v5459; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v6460; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v7461; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v2462; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v3463; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v1464; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xff, v0465; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff00, v0466; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0467; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0468; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]469;470; GFX8-SDAG-LABEL: test_vector_reduce_or_v8i8:471; GFX8-SDAG: ; %bb.0: ; %entry472; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)473; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v6474; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v4475; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v7476; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v5477; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v3478; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v2479; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v1480; GFX8-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0481; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]482;483; GFX8-GISEL-LABEL: test_vector_reduce_or_v8i8:484; GFX8-GISEL: ; %bb.0: ; %entry485; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)486; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v4487; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v5488; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v6489; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v7490; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v2491; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v3492; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v1493; GFX8-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00494; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD495; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0496; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0497; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]498;499; GFX9-SDAG-LABEL: test_vector_reduce_or_v8i8:500; GFX9-SDAG: ; %bb.0: ; %entry501; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)502; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v6503; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v4504; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v7505; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v5506; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v3507; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v2508; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v1509; GFX9-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0510; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]511;512; GFX9-GISEL-LABEL: test_vector_reduce_or_v8i8:513; GFX9-GISEL: ; %bb.0: ; %entry514; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)515; GFX9-GISEL-NEXT: v_or_b32_e32 v3, v3, v7516; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v4517; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v2, v6518; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3519; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1520; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff521; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff00522; GFX9-GISEL-NEXT: v_and_or_b32 v0, v0, v1, v2523; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff0000524; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff000000525; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2526; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]527;528; GFX10-SDAG-LABEL: test_vector_reduce_or_v8i8:529; GFX10-SDAG: ; %bb.0: ; %entry530; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)531; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v6532; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v7533; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v5534; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v4535; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v3536; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v2537; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v1538; GFX10-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0539; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]540;541; GFX10-GISEL-LABEL: test_vector_reduce_or_v8i8:542; GFX10-GISEL: ; %bb.0: ; %entry543; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)544; GFX10-GISEL-NEXT: v_or_b32_e32 v3, v3, v7545; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v4546; GFX10-GISEL-NEXT: v_or_b32_e32 v2, v2, v6547; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3548; GFX10-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00549; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1550; GFX10-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000551; GFX10-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3552; GFX10-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1553; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]554;555; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v8i8:556; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry557; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)558; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v2.l, v6.l559; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.h, v3.l, v7.l560; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v5.l561; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v4.l562; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)563; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v1.h564; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h565; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)566; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l567; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l568; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]569;570; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v8i8:571; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry572; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)573; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v6574; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v7575; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v5576; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v4577; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)578; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3579; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2580; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)581; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1582; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0583; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]584;585; GFX11-GISEL-LABEL: test_vector_reduce_or_v8i8:586; GFX11-GISEL: ; %bb.0: ; %entry587; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)588; GFX11-GISEL-NEXT: v_or_b32_e32 v3, v3, v7589; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v4590; GFX11-GISEL-NEXT: v_or_b32_e32 v2, v2, v6591; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)592; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3593; GFX11-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00594; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1595; GFX11-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000596; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)597; GFX11-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3598; GFX11-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1599; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]600;601; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v8i8:602; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry603; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0604; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0605; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0606; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0607; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0608; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v2.l, v6.l609; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.h, v3.l, v7.l610; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v5.l611; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v4.l612; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)613; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v1.h614; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h615; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)616; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l617; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l618; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]619;620; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v8i8:621; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry622; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0623; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0624; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0625; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0626; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0627; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v6628; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v7629; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v5630; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v4631; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)632; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3633; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2634; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)635; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1636; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0637; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]638;639; GFX12-GISEL-LABEL: test_vector_reduce_or_v8i8:640; GFX12-GISEL: ; %bb.0: ; %entry641; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0642; GFX12-GISEL-NEXT: s_wait_expcnt 0x0643; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0644; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0645; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0646; GFX12-GISEL-NEXT: v_or_b32_e32 v3, v3, v7647; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v4648; GFX12-GISEL-NEXT: v_or_b32_e32 v2, v2, v6649; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)650; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3651; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 0xff00652; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1653; GFX12-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000654; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)655; GFX12-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v3656; GFX12-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1657; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]658entry:659 %res = call i8 @llvm.vector.reduce.or.v8i8(<8 x i8> %v)660 ret i8 %res661}662 663define i8 @test_vector_reduce_or_v16i8(<16 x i8> %v) {664; GFX7-SDAG-LABEL: test_vector_reduce_or_v16i8:665; GFX7-SDAG: ; %bb.0: ; %entry666; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)667; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v13668; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v9669; GFX7-SDAG-NEXT: v_or_b32_e32 v7, v7, v15670; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v11671; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v12672; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v8673; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v14674; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v10675; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v6676; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v4677; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v7678; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v5679; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v3680; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v2681; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1682; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0683; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]684;685; GFX7-GISEL-LABEL: test_vector_reduce_or_v16i8:686; GFX7-GISEL: ; %bb.0: ; %entry687; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)688; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v8689; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v9690; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v10691; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v11692; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v12693; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v13694; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v14695; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v15696; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v4697; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v5698; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v6699; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v7700; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v2701; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v3702; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v1703; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xff, v0704; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff00, v0705; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0706; GFX7-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0707; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]708;709; GFX8-SDAG-LABEL: test_vector_reduce_or_v16i8:710; GFX8-SDAG: ; %bb.0: ; %entry711; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)712; GFX8-SDAG-NEXT: v_or_b32_e32 v5, v5, v13713; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v9714; GFX8-SDAG-NEXT: v_or_b32_e32 v7, v7, v15715; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v11716; GFX8-SDAG-NEXT: v_or_b32_e32 v4, v4, v12717; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v8718; GFX8-SDAG-NEXT: v_or_b32_e32 v6, v6, v14719; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v10720; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v6721; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v4722; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v7723; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v5724; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v3725; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v2726; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v1727; GFX8-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0728; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]729;730; GFX8-GISEL-LABEL: test_vector_reduce_or_v16i8:731; GFX8-GISEL: ; %bb.0: ; %entry732; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)733; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v8734; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v9735; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v10736; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v11737; GFX8-GISEL-NEXT: v_or_b32_e32 v4, v4, v12738; GFX8-GISEL-NEXT: v_or_b32_e32 v5, v5, v13739; GFX8-GISEL-NEXT: v_or_b32_e32 v6, v6, v14740; GFX8-GISEL-NEXT: v_or_b32_e32 v7, v7, v15741; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v4742; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v5743; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v6744; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v7745; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v2746; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v3747; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v1748; GFX8-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00749; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD750; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff0000, v0751; GFX8-GISEL-NEXT: v_or_b32_e32 v0, 0xff000000, v0752; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]753;754; GFX9-SDAG-LABEL: test_vector_reduce_or_v16i8:755; GFX9-SDAG: ; %bb.0: ; %entry756; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)757; GFX9-SDAG-NEXT: v_or_b32_e32 v5, v5, v13758; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v9759; GFX9-SDAG-NEXT: v_or_b32_e32 v7, v7, v15760; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v11761; GFX9-SDAG-NEXT: v_or_b32_e32 v4, v4, v12762; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v8763; GFX9-SDAG-NEXT: v_or_b32_e32 v6, v6, v14764; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v10765; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v6766; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v4767; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v7768; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v5769; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v3770; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v2771; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v1772; GFX9-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0773; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]774;775; GFX9-GISEL-LABEL: test_vector_reduce_or_v16i8:776; GFX9-GISEL: ; %bb.0: ; %entry777; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)778; GFX9-GISEL-NEXT: v_or_b32_e32 v7, v7, v15779; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v9780; GFX9-GISEL-NEXT: v_or_b32_e32 v4, v4, v12781; GFX9-GISEL-NEXT: v_or_b32_e32 v5, v5, v13782; GFX9-GISEL-NEXT: v_or_b32_e32 v6, v6, v14783; GFX9-GISEL-NEXT: v_or3_b32 v3, v3, v11, v7784; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v8, v4785; GFX9-GISEL-NEXT: v_or3_b32 v2, v2, v10, v6786; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3787; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1788; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff789; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff00790; GFX9-GISEL-NEXT: v_and_or_b32 v0, v0, v1, v2791; GFX9-GISEL-NEXT: v_mov_b32_e32 v1, 0xff0000792; GFX9-GISEL-NEXT: v_mov_b32_e32 v2, 0xff000000793; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v1, v2794; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]795;796; GFX10-SDAG-LABEL: test_vector_reduce_or_v16i8:797; GFX10-SDAG: ; %bb.0: ; %entry798; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)799; GFX10-SDAG-NEXT: v_or_b32_e32 v5, v5, v13800; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v9801; GFX10-SDAG-NEXT: v_or_b32_e32 v7, v7, v15802; GFX10-SDAG-NEXT: v_or_b32_e32 v6, v6, v14803; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v10804; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v11805; GFX10-SDAG-NEXT: v_or_b32_e32 v4, v4, v12806; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v8807; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v5808; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v6809; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v7810; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v4811; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v3812; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v2813; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v1814; GFX10-SDAG-NEXT: v_or_b32_e32 v0, 0xffffff00, v0815; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]816;817; GFX10-GISEL-LABEL: test_vector_reduce_or_v16i8:818; GFX10-GISEL: ; %bb.0: ; %entry819; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)820; GFX10-GISEL-NEXT: v_or_b32_e32 v7, v7, v15821; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v9822; GFX10-GISEL-NEXT: v_or_b32_e32 v4, v4, v12823; GFX10-GISEL-NEXT: v_or_b32_e32 v5, v5, v13824; GFX10-GISEL-NEXT: v_or_b32_e32 v6, v6, v14825; GFX10-GISEL-NEXT: v_or3_b32 v3, v3, v11, v7826; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v8, v4827; GFX10-GISEL-NEXT: v_or3_b32 v2, v2, v10, v6828; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3829; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1830; GFX10-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00831; GFX10-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v1832; GFX10-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000833; GFX10-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1834; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]835;836; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v16i8:837; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry838; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)839; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.h, v5.l, v13.l840; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v9.l841; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v5.l, v7.l, v15.l842; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v6.l, v14.l843; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v2.l, v2.l, v10.l844; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v2.h, v3.l, v11.l845; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v3.l, v4.l, v12.l846; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v8.l847; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v1.h848; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v2.l, v0.h849; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v2.l, v2.h, v5.l850; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)851; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v3.l852; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v2.l853; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)854; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h855; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l856; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)857; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l858; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]859;860; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v16i8:861; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry862; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)863; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v5, v5, v13864; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v9865; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v7, v7, v15866; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v6, v6, v14867; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v10868; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v11869; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v4, v4, v12870; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v8871; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v5872; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v6873; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v7874; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)875; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v4876; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3877; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)878; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2879; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1880; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)881; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0882; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]883;884; GFX11-GISEL-LABEL: test_vector_reduce_or_v16i8:885; GFX11-GISEL: ; %bb.0: ; %entry886; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)887; GFX11-GISEL-NEXT: v_or_b32_e32 v7, v7, v15888; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v9889; GFX11-GISEL-NEXT: v_or_b32_e32 v4, v4, v12890; GFX11-GISEL-NEXT: v_or_b32_e32 v5, v5, v13891; GFX11-GISEL-NEXT: v_or_b32_e32 v6, v6, v14892; GFX11-GISEL-NEXT: v_or3_b32 v3, v3, v11, v7893; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)894; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v8, v4895; GFX11-GISEL-NEXT: v_or3_b32 v2, v2, v10, v6896; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)897; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3898; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1899; GFX11-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00900; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)901; GFX11-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v1902; GFX11-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000903; GFX11-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1904; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]905;906; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v16i8:907; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry908; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0909; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0910; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0911; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0912; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0913; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.h, v5.l, v13.l914; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v9.l915; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v5.l, v7.l, v15.l916; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v6.l, v14.l917; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v2.l, v2.l, v10.l918; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v2.h, v3.l, v11.l919; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v3.l, v4.l, v12.l920; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v8.l921; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v1.h922; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.h, v2.l, v0.h923; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v2.l, v2.h, v5.l924; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)925; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v3.l926; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v1.l, v1.l, v2.l927; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)928; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h929; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v1.l930; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)931; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, 0xff00, v0.l932; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]933;934; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v16i8:935; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry936; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0937; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0938; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0939; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0940; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0941; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v5, v5, v13942; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v9943; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v7, v7, v15944; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v6, v6, v14945; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v10946; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v11947; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v4, v4, v12948; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v8949; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v5950; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v6951; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v7952; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)953; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v4954; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v3955; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)956; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v2957; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1958; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)959; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, 0xffffff00, v0960; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]961;962; GFX12-GISEL-LABEL: test_vector_reduce_or_v16i8:963; GFX12-GISEL: ; %bb.0: ; %entry964; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0965; GFX12-GISEL-NEXT: s_wait_expcnt 0x0966; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0967; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0968; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0969; GFX12-GISEL-NEXT: v_or_b32_e32 v7, v7, v15970; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v9971; GFX12-GISEL-NEXT: v_or_b32_e32 v4, v4, v12972; GFX12-GISEL-NEXT: v_or_b32_e32 v5, v5, v13973; GFX12-GISEL-NEXT: v_or_b32_e32 v6, v6, v14974; GFX12-GISEL-NEXT: v_or3_b32 v3, v3, v11, v7975; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)976; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v8, v4977; GFX12-GISEL-NEXT: v_or3_b32 v2, v2, v10, v6978; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)979; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v3980; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v1981; GFX12-GISEL-NEXT: v_mov_b32_e32 v1, 0xff00982; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)983; GFX12-GISEL-NEXT: v_and_or_b32 v0, 0xff, v0, v1984; GFX12-GISEL-NEXT: v_mov_b32_e32 v1, 0xff000000985; GFX12-GISEL-NEXT: v_or3_b32 v0, 0xff0000, v0, v1986; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]987entry:988 %res = call i8 @llvm.vector.reduce.or.v16i8(<16 x i8> %v)989 ret i8 %res990}991 992define i16 @test_vector_reduce_or_v2i16(<2 x i16> %v) {993; GFX7-SDAG-LABEL: test_vector_reduce_or_v2i16:994; GFX7-SDAG: ; %bb.0: ; %entry995; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)996; GFX7-SDAG-NEXT: v_lshrrev_b32_e32 v2, 16, v1997; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1998; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v2999; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01000; GFX7-SDAG-NEXT: v_lshlrev_b32_e32 v1, 16, v11001; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11002; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1003;1004; GFX7-GISEL-LABEL: test_vector_reduce_or_v2i16:1005; GFX7-GISEL: ; %bb.0: ; %entry1006; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1007; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v11008; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01009; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v2, v01010; GFX7-GISEL-NEXT: v_and_b32_e32 v1, 0xffff, v11011; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11012; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1013;1014; GFX8-LABEL: test_vector_reduce_or_v2i16:1015; GFX8: ; %bb.0: ; %entry1016; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1017; GFX8-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11018; GFX8-NEXT: s_setpc_b64 s[30:31]1019;1020; GFX9-SDAG-LABEL: test_vector_reduce_or_v2i16:1021; GFX9-SDAG: ; %bb.0: ; %entry1022; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1023; GFX9-SDAG-NEXT: v_alignbit_b32 v1, s0, v0, 161024; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v11025; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1026;1027; GFX9-GISEL-LABEL: test_vector_reduce_or_v2i16:1028; GFX9-GISEL: ; %bb.0: ; %entry1029; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1030; GFX9-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11031; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1032;1033; GFX10-SDAG-LABEL: test_vector_reduce_or_v2i16:1034; GFX10-SDAG: ; %bb.0: ; %entry1035; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1036; GFX10-SDAG-NEXT: v_alignbit_b32 v1, s4, v0, 161037; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v11038; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1039;1040; GFX10-GISEL-LABEL: test_vector_reduce_or_v2i16:1041; GFX10-GISEL: ; %bb.0: ; %entry1042; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1043; GFX10-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11044; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1045;1046; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v2i16:1047; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1048; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1049; GFX11-SDAG-TRUE16-NEXT: v_mov_b32_e32 v1, s01050; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1051; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1052; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, v1.l1053; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v21054; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1055;1056; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v2i16:1057; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1058; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1059; GFX11-SDAG-FAKE16-NEXT: v_alignbit_b32 v1, s0, v0, 161060; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1061; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11062; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1063;1064; GFX11-GISEL-LABEL: test_vector_reduce_or_v2i16:1065; GFX11-GISEL: ; %bb.0: ; %entry1066; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1067; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01068; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1069; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11070; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1071;1072; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v2i16:1073; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1074; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01075; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01076; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01077; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01078; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01079; GFX12-SDAG-TRUE16-NEXT: v_mov_b32_e32 v1, s01080; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1081; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1082; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, v1.l1083; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v21084; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1085;1086; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v2i16:1087; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1088; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01089; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01090; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01091; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01092; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01093; GFX12-SDAG-FAKE16-NEXT: v_alignbit_b32 v1, s0, v0, 161094; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1095; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11096; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1097;1098; GFX12-GISEL-LABEL: test_vector_reduce_or_v2i16:1099; GFX12-GISEL: ; %bb.0: ; %entry1100; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01101; GFX12-GISEL-NEXT: s_wait_expcnt 0x01102; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01103; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01104; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01105; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01106; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1107; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11108; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1109entry:1110 %res = call i16 @llvm.vector.reduce.or.v2i16(<2 x i16> %v)1111 ret i16 %res1112}1113 1114define i16 @test_vector_reduce_or_v3i16(<3 x i16> %v) {1115; GFX7-SDAG-LABEL: test_vector_reduce_or_v3i16:1116; GFX7-SDAG: ; %bb.0: ; %entry1117; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1118; GFX7-SDAG-NEXT: v_lshlrev_b32_e32 v1, 16, v11119; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01120; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11121; GFX7-SDAG-NEXT: v_and_b32_e32 v1, 0xffff, v21122; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11123; GFX7-SDAG-NEXT: v_lshrrev_b32_e32 v1, 16, v01124; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11125; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1126;1127; GFX7-GISEL-LABEL: test_vector_reduce_or_v3i16:1128; GFX7-GISEL: ; %bb.0: ; %entry1129; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1130; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11131; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v21132; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1133;1134; GFX8-LABEL: test_vector_reduce_or_v3i16:1135; GFX8: ; %bb.0: ; %entry1136; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1137; GFX8-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11138; GFX8-NEXT: v_or_b32_e32 v0, v0, v11139; GFX8-NEXT: s_setpc_b64 s[30:31]1140;1141; GFX9-LABEL: test_vector_reduce_or_v3i16:1142; GFX9: ; %bb.0: ; %entry1143; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1144; GFX9-NEXT: v_lshrrev_b32_e32 v2, 16, v01145; GFX9-NEXT: v_or3_b32 v0, v0, v2, v11146; GFX9-NEXT: s_setpc_b64 s[30:31]1147;1148; GFX10-LABEL: test_vector_reduce_or_v3i16:1149; GFX10: ; %bb.0: ; %entry1150; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1151; GFX10-NEXT: v_lshrrev_b32_e32 v2, 16, v01152; GFX10-NEXT: v_or3_b32 v0, v0, v2, v11153; GFX10-NEXT: s_setpc_b64 s[30:31]1154;1155; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v3i16:1156; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1157; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1158; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, 01159; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1160; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1161; GFX11-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11162; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1163;1164; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v3i16:1165; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1166; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1167; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v2, 16, v01168; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1169; GFX11-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11170; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1171;1172; GFX11-GISEL-LABEL: test_vector_reduce_or_v3i16:1173; GFX11-GISEL: ; %bb.0: ; %entry1174; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1175; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v01176; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1177; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v11178; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1179;1180; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v3i16:1181; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1182; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01183; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01184; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01185; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01186; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01187; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, 01188; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1189; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1190; GFX12-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11191; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1192;1193; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v3i16:1194; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1195; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01196; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01197; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01198; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01199; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01200; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v2, 16, v01201; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1202; GFX12-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11203; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1204;1205; GFX12-GISEL-LABEL: test_vector_reduce_or_v3i16:1206; GFX12-GISEL: ; %bb.0: ; %entry1207; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01208; GFX12-GISEL-NEXT: s_wait_expcnt 0x01209; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01210; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01211; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01212; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v01213; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1214; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v11215; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1216entry:1217 %res = call i16 @llvm.vector.reduce.or.v3i16(<3 x i16> %v)1218 ret i16 %res1219}1220 1221define i16 @test_vector_reduce_or_v4i16(<4 x i16> %v) {1222; GFX7-SDAG-LABEL: test_vector_reduce_or_v4i16:1223; GFX7-SDAG: ; %bb.0: ; %entry1224; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1225; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v31226; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v21227; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11228; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffff0000, v01229; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1230;1231; GFX7-GISEL-LABEL: test_vector_reduce_or_v4i16:1232; GFX7-GISEL: ; %bb.0: ; %entry1233; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1234; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11235; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01236; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01237; GFX7-GISEL-NEXT: v_and_b32_e32 v1, 0xffff, v21238; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v31239; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v21240; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21241; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11242; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01243; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11244; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1245;1246; GFX8-SDAG-LABEL: test_vector_reduce_or_v4i16:1247; GFX8-SDAG: ; %bb.0: ; %entry1248; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1249; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v11250; GFX8-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11251; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1252;1253; GFX8-GISEL-LABEL: test_vector_reduce_or_v4i16:1254; GFX8-GISEL: ; %bb.0: ; %entry1255; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1256; GFX8-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v11257; GFX8-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v21258; GFX8-GISEL-NEXT: v_or_b32_sdwa v1, v1, v2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD1259; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v11260; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11261; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1262;1263; GFX9-LABEL: test_vector_reduce_or_v4i16:1264; GFX9: ; %bb.0: ; %entry1265; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1266; GFX9-NEXT: v_or_b32_e32 v0, v0, v11267; GFX9-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11268; GFX9-NEXT: s_setpc_b64 s[30:31]1269;1270; GFX10-LABEL: test_vector_reduce_or_v4i16:1271; GFX10: ; %bb.0: ; %entry1272; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1273; GFX10-NEXT: v_or_b32_e32 v0, v0, v11274; GFX10-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11275; GFX10-NEXT: s_setpc_b64 s[30:31]1276;1277; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v4i16:1278; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1279; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1280; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11281; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01282; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1283; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1284; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11285; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1286;1287; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v4i16:1288; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1289; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1290; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11291; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1292; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01293; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11294; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1295;1296; GFX11-GISEL-LABEL: test_vector_reduce_or_v4i16:1297; GFX11-GISEL: ; %bb.0: ; %entry1298; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1299; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11300; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1301; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01302; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11303; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1304;1305; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v4i16:1306; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1307; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01308; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01309; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01310; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01311; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01312; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11313; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01314; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1315; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1316; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11317; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1318;1319; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v4i16:1320; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1321; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01322; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01323; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01324; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01325; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01326; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11327; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1328; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01329; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11330; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1331;1332; GFX12-GISEL-LABEL: test_vector_reduce_or_v4i16:1333; GFX12-GISEL: ; %bb.0: ; %entry1334; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01335; GFX12-GISEL-NEXT: s_wait_expcnt 0x01336; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01337; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01338; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01339; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11340; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1341; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01342; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11343; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1344entry:1345 %res = call i16 @llvm.vector.reduce.or.v4i16(<4 x i16> %v)1346 ret i16 %res1347}1348 1349define i16 @test_vector_reduce_or_v8i16(<8 x i16> %v) {1350; GFX7-SDAG-LABEL: test_vector_reduce_or_v8i16:1351; GFX7-SDAG: ; %bb.0: ; %entry1352; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1353; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v61354; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v41355; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v71356; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v51357; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v31358; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v21359; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11360; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffff0000, v01361; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1362;1363; GFX7-GISEL-LABEL: test_vector_reduce_or_v8i16:1364; GFX7-GISEL: ; %bb.0: ; %entry1365; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1366; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11367; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01368; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01369; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v31370; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v21371; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21372; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v51373; GFX7-GISEL-NEXT: v_and_b32_e32 v3, 0xffff, v41374; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v31375; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v3, 16, v71376; GFX7-GISEL-NEXT: v_and_b32_e32 v4, 0xffff, v61377; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v41378; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v21379; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v31380; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11381; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01382; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11383; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1384;1385; GFX8-SDAG-LABEL: test_vector_reduce_or_v8i16:1386; GFX8-SDAG: ; %bb.0: ; %entry1387; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1388; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v31389; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v21390; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v11391; GFX8-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11392; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1393;1394; GFX8-GISEL-LABEL: test_vector_reduce_or_v8i16:1395; GFX8-GISEL: ; %bb.0: ; %entry1396; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1397; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v21398; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v31399; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v11400; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11401; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1402;1403; GFX9-SDAG-LABEL: test_vector_reduce_or_v8i16:1404; GFX9-SDAG: ; %bb.0: ; %entry1405; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1406; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v31407; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v2, v11408; GFX9-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11409; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1410;1411; GFX9-GISEL-LABEL: test_vector_reduce_or_v8i16:1412; GFX9-GISEL: ; %bb.0: ; %entry1413; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1414; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v21415; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v31416; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v11417; GFX9-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11418; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1419;1420; GFX10-SDAG-LABEL: test_vector_reduce_or_v8i16:1421; GFX10-SDAG: ; %bb.0: ; %entry1422; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1423; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v31424; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v2, v11425; GFX10-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11426; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1427;1428; GFX10-GISEL-LABEL: test_vector_reduce_or_v8i16:1429; GFX10-GISEL: ; %bb.0: ; %entry1430; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1431; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v21432; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v31433; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v11434; GFX10-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11435; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1436;1437; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v8i16:1438; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1439; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1440; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v1, v1, v31441; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)1442; GFX11-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11443; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01444; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1445; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1446; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11447; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1448;1449; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v8i16:1450; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1451; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1452; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v31453; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1454; GFX11-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11455; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01456; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1457; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11458; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1459;1460; GFX11-GISEL-LABEL: test_vector_reduce_or_v8i16:1461; GFX11-GISEL: ; %bb.0: ; %entry1462; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1463; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v21464; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v31465; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1466; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11467; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01468; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1469; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11470; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1471;1472; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v8i16:1473; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1474; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01475; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01476; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01477; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01478; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01479; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v1, v1, v31480; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)1481; GFX12-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11482; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01483; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1484; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1485; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11486; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1487;1488; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v8i16:1489; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1490; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01491; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01492; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01493; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01494; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01495; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v1, v1, v31496; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1497; GFX12-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11498; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01499; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1500; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11501; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1502;1503; GFX12-GISEL-LABEL: test_vector_reduce_or_v8i16:1504; GFX12-GISEL: ; %bb.0: ; %entry1505; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01506; GFX12-GISEL-NEXT: s_wait_expcnt 0x01507; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01508; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01509; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01510; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v21511; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v31512; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1513; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11514; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01515; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1516; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11517; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1518entry:1519 %res = call i16 @llvm.vector.reduce.or.v8i16(<8 x i16> %v)1520 ret i16 %res1521}1522 1523define i16 @test_vector_reduce_or_v16i16(<16 x i16> %v) {1524; GFX7-SDAG-LABEL: test_vector_reduce_or_v16i16:1525; GFX7-SDAG: ; %bb.0: ; %entry1526; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1527; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v131528; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v91529; GFX7-SDAG-NEXT: v_or_b32_e32 v7, v7, v151530; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v111531; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v121532; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v81533; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v141534; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v101535; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v61536; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v41537; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v71538; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v51539; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v31540; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v21541; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11542; GFX7-SDAG-NEXT: v_or_b32_e32 v0, 0xffff0000, v01543; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1544;1545; GFX7-GISEL-LABEL: test_vector_reduce_or_v16i16:1546; GFX7-GISEL: ; %bb.0: ; %entry1547; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1548; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11549; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01550; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01551; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v31552; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v21553; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21554; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v51555; GFX7-GISEL-NEXT: v_and_b32_e32 v3, 0xffff, v41556; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v31557; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v3, 16, v71558; GFX7-GISEL-NEXT: v_and_b32_e32 v4, 0xffff, v61559; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v41560; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v4, 16, v91561; GFX7-GISEL-NEXT: v_and_b32_e32 v5, 0xffff, v81562; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v51563; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v5, 16, v111564; GFX7-GISEL-NEXT: v_and_b32_e32 v6, 0xffff, v101565; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v61566; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v6, 16, v131567; GFX7-GISEL-NEXT: v_and_b32_e32 v7, 0xffff, v121568; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v71569; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v7, 16, v151570; GFX7-GISEL-NEXT: v_and_b32_e32 v8, 0xffff, v141571; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v81572; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v41573; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v51574; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v61575; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v71576; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v21577; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v31578; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11579; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01580; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11581; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1582;1583; GFX8-SDAG-LABEL: test_vector_reduce_or_v16i16:1584; GFX8-SDAG: ; %bb.0: ; %entry1585; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1586; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v61587; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v41588; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v71589; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v51590; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v31591; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v21592; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v11593; GFX8-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11594; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1595;1596; GFX8-GISEL-LABEL: test_vector_reduce_or_v16i16:1597; GFX8-GISEL: ; %bb.0: ; %entry1598; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1599; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v41600; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v51601; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v61602; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v71603; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v21604; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v31605; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v11606; GFX8-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11607; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1608;1609; GFX9-SDAG-LABEL: test_vector_reduce_or_v16i16:1610; GFX9-SDAG: ; %bb.0: ; %entry1611; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1612; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v71613; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v61614; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v41615; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v31616; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v2, v11617; GFX9-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11618; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1619;1620; GFX9-GISEL-LABEL: test_vector_reduce_or_v16i16:1621; GFX9-GISEL: ; %bb.0: ; %entry1622; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1623; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v41624; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v51625; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v2, v61626; GFX9-GISEL-NEXT: v_or_b32_e32 v3, v3, v71627; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v21628; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v31629; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v11630; GFX9-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11631; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1632;1633; GFX10-SDAG-LABEL: test_vector_reduce_or_v16i16:1634; GFX10-SDAG: ; %bb.0: ; %entry1635; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1636; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v71637; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v61638; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v41639; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v5, v31640; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v2, v11641; GFX10-SDAG-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11642; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1643;1644; GFX10-GISEL-LABEL: test_vector_reduce_or_v16i16:1645; GFX10-GISEL: ; %bb.0: ; %entry1646; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1647; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v41648; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v51649; GFX10-GISEL-NEXT: v_or_b32_e32 v2, v2, v61650; GFX10-GISEL-NEXT: v_or_b32_e32 v3, v3, v71651; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v21652; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v31653; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v11654; GFX10-GISEL-NEXT: v_or_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11655; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1656;1657; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_or_v16i16:1658; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1659; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1660; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v3, v3, v71661; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v2, v2, v61662; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v41663; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1664; GFX11-SDAG-TRUE16-NEXT: v_or3_b32 v1, v1, v5, v31665; GFX11-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11666; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01667; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1668; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1669; GFX11-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11670; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1671;1672; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_or_v16i16:1673; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1674; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1675; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v71676; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v61677; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v41678; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1679; GFX11-SDAG-FAKE16-NEXT: v_or3_b32 v1, v1, v5, v31680; GFX11-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11681; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1682; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01683; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11684; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1685;1686; GFX11-GISEL-LABEL: test_vector_reduce_or_v16i16:1687; GFX11-GISEL: ; %bb.0: ; %entry1688; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1689; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v41690; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v51691; GFX11-GISEL-NEXT: v_or_b32_e32 v2, v2, v61692; GFX11-GISEL-NEXT: v_or_b32_e32 v3, v3, v71693; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)1694; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v21695; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v31696; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1697; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11698; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01699; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1700; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v11701; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1702;1703; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_or_v16i16:1704; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1705; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01706; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01707; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01708; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01709; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01710; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v3, v3, v71711; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v2, v2, v61712; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v41713; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1714; GFX12-SDAG-TRUE16-NEXT: v_or3_b32 v1, v1, v5, v31715; GFX12-SDAG-TRUE16-NEXT: v_or3_b32 v0, v0, v2, v11716; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01717; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1718; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1719; GFX12-SDAG-TRUE16-NEXT: v_or_b32_e32 v0, v0, v11720; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1721;1722; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_or_v16i16:1723; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1724; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01725; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01726; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01727; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01728; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01729; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v3, v3, v71730; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v2, v2, v61731; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v41732; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1733; GFX12-SDAG-FAKE16-NEXT: v_or3_b32 v1, v1, v5, v31734; GFX12-SDAG-FAKE16-NEXT: v_or3_b32 v0, v0, v2, v11735; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1736; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01737; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v11738; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1739;1740; GFX12-GISEL-LABEL: test_vector_reduce_or_v16i16:1741; GFX12-GISEL: ; %bb.0: ; %entry1742; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01743; GFX12-GISEL-NEXT: s_wait_expcnt 0x01744; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01745; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01746; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01747; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v41748; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v51749; GFX12-GISEL-NEXT: v_or_b32_e32 v2, v2, v61750; GFX12-GISEL-NEXT: v_or_b32_e32 v3, v3, v71751; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)1752; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v21753; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v31754; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1755; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11756; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01757; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1758; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v11759; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1760entry:1761 %res = call i16 @llvm.vector.reduce.or.v16i16(<16 x i16> %v)1762 ret i16 %res1763}1764 1765 1766define i32 @test_vector_reduce_or_v2i32(<2 x i32> %v) {1767; GFX7-LABEL: test_vector_reduce_or_v2i32:1768; GFX7: ; %bb.0: ; %entry1769; GFX7-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1770; GFX7-NEXT: v_or_b32_e32 v0, v0, v11771; GFX7-NEXT: s_setpc_b64 s[30:31]1772;1773; GFX8-LABEL: test_vector_reduce_or_v2i32:1774; GFX8: ; %bb.0: ; %entry1775; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1776; GFX8-NEXT: v_or_b32_e32 v0, v0, v11777; GFX8-NEXT: s_setpc_b64 s[30:31]1778;1779; GFX9-LABEL: test_vector_reduce_or_v2i32:1780; GFX9: ; %bb.0: ; %entry1781; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1782; GFX9-NEXT: v_or_b32_e32 v0, v0, v11783; GFX9-NEXT: s_setpc_b64 s[30:31]1784;1785; GFX10-LABEL: test_vector_reduce_or_v2i32:1786; GFX10: ; %bb.0: ; %entry1787; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1788; GFX10-NEXT: v_or_b32_e32 v0, v0, v11789; GFX10-NEXT: s_setpc_b64 s[30:31]1790;1791; GFX11-LABEL: test_vector_reduce_or_v2i32:1792; GFX11: ; %bb.0: ; %entry1793; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1794; GFX11-NEXT: v_or_b32_e32 v0, v0, v11795; GFX11-NEXT: s_setpc_b64 s[30:31]1796;1797; GFX12-LABEL: test_vector_reduce_or_v2i32:1798; GFX12: ; %bb.0: ; %entry1799; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01800; GFX12-NEXT: s_wait_expcnt 0x01801; GFX12-NEXT: s_wait_samplecnt 0x01802; GFX12-NEXT: s_wait_bvhcnt 0x01803; GFX12-NEXT: s_wait_kmcnt 0x01804; GFX12-NEXT: v_or_b32_e32 v0, v0, v11805; GFX12-NEXT: s_setpc_b64 s[30:31]1806entry:1807 %res = call i32 @llvm.vector.reduce.or.v2i32(<2 x i32> %v)1808 ret i32 %res1809}1810 1811define i32 @test_vector_reduce_or_v3i32(<3 x i32> %v) {1812; GFX7-LABEL: test_vector_reduce_or_v3i32:1813; GFX7: ; %bb.0: ; %entry1814; GFX7-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1815; GFX7-NEXT: v_or_b32_e32 v0, v0, v11816; GFX7-NEXT: v_or_b32_e32 v0, v0, v21817; GFX7-NEXT: s_setpc_b64 s[30:31]1818;1819; GFX8-LABEL: test_vector_reduce_or_v3i32:1820; GFX8: ; %bb.0: ; %entry1821; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1822; GFX8-NEXT: v_or_b32_e32 v0, v0, v11823; GFX8-NEXT: v_or_b32_e32 v0, v0, v21824; GFX8-NEXT: s_setpc_b64 s[30:31]1825;1826; GFX9-LABEL: test_vector_reduce_or_v3i32:1827; GFX9: ; %bb.0: ; %entry1828; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1829; GFX9-NEXT: v_or3_b32 v0, v0, v1, v21830; GFX9-NEXT: s_setpc_b64 s[30:31]1831;1832; GFX10-LABEL: test_vector_reduce_or_v3i32:1833; GFX10: ; %bb.0: ; %entry1834; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1835; GFX10-NEXT: v_or3_b32 v0, v0, v1, v21836; GFX10-NEXT: s_setpc_b64 s[30:31]1837;1838; GFX11-LABEL: test_vector_reduce_or_v3i32:1839; GFX11: ; %bb.0: ; %entry1840; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1841; GFX11-NEXT: v_or3_b32 v0, v0, v1, v21842; GFX11-NEXT: s_setpc_b64 s[30:31]1843;1844; GFX12-LABEL: test_vector_reduce_or_v3i32:1845; GFX12: ; %bb.0: ; %entry1846; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01847; GFX12-NEXT: s_wait_expcnt 0x01848; GFX12-NEXT: s_wait_samplecnt 0x01849; GFX12-NEXT: s_wait_bvhcnt 0x01850; GFX12-NEXT: s_wait_kmcnt 0x01851; GFX12-NEXT: v_or3_b32 v0, v0, v1, v21852; GFX12-NEXT: s_setpc_b64 s[30:31]1853entry:1854 %res = call i32 @llvm.vector.reduce.or.v3i32(<3 x i32> %v)1855 ret i32 %res1856}1857 1858define i32 @test_vector_reduce_or_v4i32(<4 x i32> %v) {1859; GFX7-SDAG-LABEL: test_vector_reduce_or_v4i32:1860; GFX7-SDAG: ; %bb.0: ; %entry1861; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1862; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v31863; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v21864; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11865; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1866;1867; GFX7-GISEL-LABEL: test_vector_reduce_or_v4i32:1868; GFX7-GISEL: ; %bb.0: ; %entry1869; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1870; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v21871; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v31872; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11873; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1874;1875; GFX8-SDAG-LABEL: test_vector_reduce_or_v4i32:1876; GFX8-SDAG: ; %bb.0: ; %entry1877; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1878; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v31879; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v21880; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v11881; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1882;1883; GFX8-GISEL-LABEL: test_vector_reduce_or_v4i32:1884; GFX8-GISEL: ; %bb.0: ; %entry1885; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1886; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v21887; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v31888; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v11889; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1890;1891; GFX9-LABEL: test_vector_reduce_or_v4i32:1892; GFX9: ; %bb.0: ; %entry1893; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1894; GFX9-NEXT: v_or_b32_e32 v1, v1, v31895; GFX9-NEXT: v_or3_b32 v0, v0, v2, v11896; GFX9-NEXT: s_setpc_b64 s[30:31]1897;1898; GFX10-LABEL: test_vector_reduce_or_v4i32:1899; GFX10: ; %bb.0: ; %entry1900; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1901; GFX10-NEXT: v_or_b32_e32 v1, v1, v31902; GFX10-NEXT: v_or3_b32 v0, v0, v2, v11903; GFX10-NEXT: s_setpc_b64 s[30:31]1904;1905; GFX11-LABEL: test_vector_reduce_or_v4i32:1906; GFX11: ; %bb.0: ; %entry1907; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1908; GFX11-NEXT: v_or_b32_e32 v1, v1, v31909; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)1910; GFX11-NEXT: v_or3_b32 v0, v0, v2, v11911; GFX11-NEXT: s_setpc_b64 s[30:31]1912;1913; GFX12-LABEL: test_vector_reduce_or_v4i32:1914; GFX12: ; %bb.0: ; %entry1915; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01916; GFX12-NEXT: s_wait_expcnt 0x01917; GFX12-NEXT: s_wait_samplecnt 0x01918; GFX12-NEXT: s_wait_bvhcnt 0x01919; GFX12-NEXT: s_wait_kmcnt 0x01920; GFX12-NEXT: v_or_b32_e32 v1, v1, v31921; GFX12-NEXT: s_delay_alu instid0(VALU_DEP_1)1922; GFX12-NEXT: v_or3_b32 v0, v0, v2, v11923; GFX12-NEXT: s_setpc_b64 s[30:31]1924entry:1925 %res = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %v)1926 ret i32 %res1927}1928 1929define i32 @test_vector_reduce_or_v8i32(<8 x i32> %v) {1930; GFX7-SDAG-LABEL: test_vector_reduce_or_v8i32:1931; GFX7-SDAG: ; %bb.0: ; %entry1932; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1933; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v61934; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v41935; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v71936; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v51937; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v31938; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v21939; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11940; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1941;1942; GFX7-GISEL-LABEL: test_vector_reduce_or_v8i32:1943; GFX7-GISEL: ; %bb.0: ; %entry1944; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1945; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v41946; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v51947; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v61948; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v71949; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v21950; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v31951; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v11952; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1953;1954; GFX8-SDAG-LABEL: test_vector_reduce_or_v8i32:1955; GFX8-SDAG: ; %bb.0: ; %entry1956; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1957; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v61958; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v41959; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v71960; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v51961; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v31962; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v21963; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v11964; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1965;1966; GFX8-GISEL-LABEL: test_vector_reduce_or_v8i32:1967; GFX8-GISEL: ; %bb.0: ; %entry1968; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1969; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v41970; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v51971; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v61972; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v71973; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v21974; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v31975; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v11976; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1977;1978; GFX9-SDAG-LABEL: test_vector_reduce_or_v8i32:1979; GFX9-SDAG: ; %bb.0: ; %entry1980; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1981; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v71982; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v61983; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v41984; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v31985; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v2, v11986; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1987;1988; GFX9-GISEL-LABEL: test_vector_reduce_or_v8i32:1989; GFX9-GISEL: ; %bb.0: ; %entry1990; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1991; GFX9-GISEL-NEXT: v_or_b32_e32 v3, v3, v71992; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v41993; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v2, v61994; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v31995; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v11996; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1997;1998; GFX10-SDAG-LABEL: test_vector_reduce_or_v8i32:1999; GFX10-SDAG: ; %bb.0: ; %entry2000; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2001; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v72002; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v62003; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v42004; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32005; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12006; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2007;2008; GFX10-GISEL-LABEL: test_vector_reduce_or_v8i32:2009; GFX10-GISEL: ; %bb.0: ; %entry2010; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2011; GFX10-GISEL-NEXT: v_or_b32_e32 v3, v3, v72012; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v42013; GFX10-GISEL-NEXT: v_or_b32_e32 v2, v2, v62014; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32015; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12016; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2017;2018; GFX11-SDAG-LABEL: test_vector_reduce_or_v8i32:2019; GFX11-SDAG: ; %bb.0: ; %entry2020; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2021; GFX11-SDAG-NEXT: v_or_b32_e32 v3, v3, v72022; GFX11-SDAG-NEXT: v_or_b32_e32 v2, v2, v62023; GFX11-SDAG-NEXT: v_or_b32_e32 v0, v0, v42024; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2025; GFX11-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32026; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12027; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2028;2029; GFX11-GISEL-LABEL: test_vector_reduce_or_v8i32:2030; GFX11-GISEL: ; %bb.0: ; %entry2031; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2032; GFX11-GISEL-NEXT: v_or_b32_e32 v3, v3, v72033; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v42034; GFX11-GISEL-NEXT: v_or_b32_e32 v2, v2, v62035; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2036; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32037; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12038; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2039;2040; GFX12-SDAG-LABEL: test_vector_reduce_or_v8i32:2041; GFX12-SDAG: ; %bb.0: ; %entry2042; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02043; GFX12-SDAG-NEXT: s_wait_expcnt 0x02044; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02045; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02046; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02047; GFX12-SDAG-NEXT: v_or_b32_e32 v3, v3, v72048; GFX12-SDAG-NEXT: v_or_b32_e32 v2, v2, v62049; GFX12-SDAG-NEXT: v_or_b32_e32 v0, v0, v42050; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2051; GFX12-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32052; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12053; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2054;2055; GFX12-GISEL-LABEL: test_vector_reduce_or_v8i32:2056; GFX12-GISEL: ; %bb.0: ; %entry2057; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02058; GFX12-GISEL-NEXT: s_wait_expcnt 0x02059; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02060; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02061; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02062; GFX12-GISEL-NEXT: v_or_b32_e32 v3, v3, v72063; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v42064; GFX12-GISEL-NEXT: v_or_b32_e32 v2, v2, v62065; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2066; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32067; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12068; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2069entry:2070 %res = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> %v)2071 ret i32 %res2072}2073 2074define i32 @test_vector_reduce_or_v16i32(<16 x i32> %v) {2075; GFX7-SDAG-LABEL: test_vector_reduce_or_v16i32:2076; GFX7-SDAG: ; %bb.0: ; %entry2077; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2078; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v132079; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v92080; GFX7-SDAG-NEXT: v_or_b32_e32 v7, v7, v152081; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v112082; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v122083; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v82084; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v142085; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v102086; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v62087; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v42088; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v72089; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v52090; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v32091; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22092; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v12093; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2094;2095; GFX7-GISEL-LABEL: test_vector_reduce_or_v16i32:2096; GFX7-GISEL: ; %bb.0: ; %entry2097; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2098; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v82099; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v92100; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v102101; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v112102; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v122103; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v132104; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v142105; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v152106; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v42107; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v52108; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v62109; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v72110; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22111; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v32112; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v12113; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2114;2115; GFX8-SDAG-LABEL: test_vector_reduce_or_v16i32:2116; GFX8-SDAG: ; %bb.0: ; %entry2117; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2118; GFX8-SDAG-NEXT: v_or_b32_e32 v5, v5, v132119; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v92120; GFX8-SDAG-NEXT: v_or_b32_e32 v7, v7, v152121; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v112122; GFX8-SDAG-NEXT: v_or_b32_e32 v4, v4, v122123; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v82124; GFX8-SDAG-NEXT: v_or_b32_e32 v6, v6, v142125; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v102126; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v62127; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v42128; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v72129; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v52130; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v32131; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22132; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v12133; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2134;2135; GFX8-GISEL-LABEL: test_vector_reduce_or_v16i32:2136; GFX8-GISEL: ; %bb.0: ; %entry2137; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2138; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v82139; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v92140; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v102141; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v112142; GFX8-GISEL-NEXT: v_or_b32_e32 v4, v4, v122143; GFX8-GISEL-NEXT: v_or_b32_e32 v5, v5, v132144; GFX8-GISEL-NEXT: v_or_b32_e32 v6, v6, v142145; GFX8-GISEL-NEXT: v_or_b32_e32 v7, v7, v152146; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v42147; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v52148; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v62149; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v72150; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22151; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v32152; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v12153; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2154;2155; GFX9-SDAG-LABEL: test_vector_reduce_or_v16i32:2156; GFX9-SDAG: ; %bb.0: ; %entry2157; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2158; GFX9-SDAG-NEXT: v_or_b32_e32 v7, v7, v152159; GFX9-SDAG-NEXT: v_or_b32_e32 v5, v5, v132160; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v92161; GFX9-SDAG-NEXT: v_or_b32_e32 v4, v4, v122162; GFX9-SDAG-NEXT: v_or_b32_e32 v6, v6, v142163; GFX9-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72164; GFX9-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62165; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v8, v42166; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32167; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12168; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2169;2170; GFX9-GISEL-LABEL: test_vector_reduce_or_v16i32:2171; GFX9-GISEL: ; %bb.0: ; %entry2172; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2173; GFX9-GISEL-NEXT: v_or_b32_e32 v7, v7, v152174; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v92175; GFX9-GISEL-NEXT: v_or_b32_e32 v4, v4, v122176; GFX9-GISEL-NEXT: v_or_b32_e32 v5, v5, v132177; GFX9-GISEL-NEXT: v_or_b32_e32 v6, v6, v142178; GFX9-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72179; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v8, v42180; GFX9-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62181; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32182; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12183; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2184;2185; GFX10-SDAG-LABEL: test_vector_reduce_or_v16i32:2186; GFX10-SDAG: ; %bb.0: ; %entry2187; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2188; GFX10-SDAG-NEXT: v_or_b32_e32 v7, v7, v152189; GFX10-SDAG-NEXT: v_or_b32_e32 v5, v5, v132190; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v92191; GFX10-SDAG-NEXT: v_or_b32_e32 v6, v6, v142192; GFX10-SDAG-NEXT: v_or_b32_e32 v4, v4, v122193; GFX10-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72194; GFX10-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62195; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v8, v42196; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32197; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12198; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2199;2200; GFX10-GISEL-LABEL: test_vector_reduce_or_v16i32:2201; GFX10-GISEL: ; %bb.0: ; %entry2202; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2203; GFX10-GISEL-NEXT: v_or_b32_e32 v7, v7, v152204; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v92205; GFX10-GISEL-NEXT: v_or_b32_e32 v4, v4, v122206; GFX10-GISEL-NEXT: v_or_b32_e32 v5, v5, v132207; GFX10-GISEL-NEXT: v_or_b32_e32 v6, v6, v142208; GFX10-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72209; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v8, v42210; GFX10-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62211; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32212; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12213; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2214;2215; GFX11-SDAG-LABEL: test_vector_reduce_or_v16i32:2216; GFX11-SDAG: ; %bb.0: ; %entry2217; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2218; GFX11-SDAG-NEXT: v_or_b32_e32 v7, v7, v152219; GFX11-SDAG-NEXT: v_or_b32_e32 v5, v5, v132220; GFX11-SDAG-NEXT: v_or_b32_e32 v1, v1, v92221; GFX11-SDAG-NEXT: v_or_b32_e32 v6, v6, v142222; GFX11-SDAG-NEXT: v_or_b32_e32 v4, v4, v122223; GFX11-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72224; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)2225; GFX11-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62226; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v8, v42227; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2228; GFX11-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32229; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12230; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2231;2232; GFX11-GISEL-LABEL: test_vector_reduce_or_v16i32:2233; GFX11-GISEL: ; %bb.0: ; %entry2234; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2235; GFX11-GISEL-NEXT: v_or_b32_e32 v7, v7, v152236; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v92237; GFX11-GISEL-NEXT: v_or_b32_e32 v4, v4, v122238; GFX11-GISEL-NEXT: v_or_b32_e32 v5, v5, v132239; GFX11-GISEL-NEXT: v_or_b32_e32 v6, v6, v142240; GFX11-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72241; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)2242; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v8, v42243; GFX11-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62244; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2245; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32246; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12247; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2248;2249; GFX12-SDAG-LABEL: test_vector_reduce_or_v16i32:2250; GFX12-SDAG: ; %bb.0: ; %entry2251; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02252; GFX12-SDAG-NEXT: s_wait_expcnt 0x02253; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02254; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02255; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02256; GFX12-SDAG-NEXT: v_or_b32_e32 v7, v7, v152257; GFX12-SDAG-NEXT: v_or_b32_e32 v5, v5, v132258; GFX12-SDAG-NEXT: v_or_b32_e32 v1, v1, v92259; GFX12-SDAG-NEXT: v_or_b32_e32 v6, v6, v142260; GFX12-SDAG-NEXT: v_or_b32_e32 v4, v4, v122261; GFX12-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72262; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)2263; GFX12-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62264; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v8, v42265; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2266; GFX12-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32267; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v2, v12268; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2269;2270; GFX12-GISEL-LABEL: test_vector_reduce_or_v16i32:2271; GFX12-GISEL: ; %bb.0: ; %entry2272; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02273; GFX12-GISEL-NEXT: s_wait_expcnt 0x02274; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02275; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02276; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02277; GFX12-GISEL-NEXT: v_or_b32_e32 v7, v7, v152278; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v92279; GFX12-GISEL-NEXT: v_or_b32_e32 v4, v4, v122280; GFX12-GISEL-NEXT: v_or_b32_e32 v5, v5, v132281; GFX12-GISEL-NEXT: v_or_b32_e32 v6, v6, v142282; GFX12-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72283; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)2284; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v8, v42285; GFX12-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62286; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2287; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32288; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v2, v12289; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2290entry:2291 %res = call i32 @llvm.vector.reduce.or.v16i32(<16 x i32> %v)2292 ret i32 %res2293}2294 2295define i64 @test_vector_reduce_or_v2i64(<2 x i64> %v) {2296; GFX7-SDAG-LABEL: test_vector_reduce_or_v2i64:2297; GFX7-SDAG: ; %bb.0: ; %entry2298; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2299; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v32300; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22301; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2302;2303; GFX7-GISEL-LABEL: test_vector_reduce_or_v2i64:2304; GFX7-GISEL: ; %bb.0: ; %entry2305; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2306; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22307; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v32308; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2309;2310; GFX8-SDAG-LABEL: test_vector_reduce_or_v2i64:2311; GFX8-SDAG: ; %bb.0: ; %entry2312; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2313; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v32314; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22315; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2316;2317; GFX8-GISEL-LABEL: test_vector_reduce_or_v2i64:2318; GFX8-GISEL: ; %bb.0: ; %entry2319; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2320; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22321; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v32322; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2323;2324; GFX9-SDAG-LABEL: test_vector_reduce_or_v2i64:2325; GFX9-SDAG: ; %bb.0: ; %entry2326; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2327; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v32328; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v22329; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2330;2331; GFX9-GISEL-LABEL: test_vector_reduce_or_v2i64:2332; GFX9-GISEL: ; %bb.0: ; %entry2333; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2334; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v22335; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v32336; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2337;2338; GFX10-LABEL: test_vector_reduce_or_v2i64:2339; GFX10: ; %bb.0: ; %entry2340; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2341; GFX10-NEXT: v_or_b32_e32 v0, v0, v22342; GFX10-NEXT: v_or_b32_e32 v1, v1, v32343; GFX10-NEXT: s_setpc_b64 s[30:31]2344;2345; GFX11-LABEL: test_vector_reduce_or_v2i64:2346; GFX11: ; %bb.0: ; %entry2347; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2348; GFX11-NEXT: v_or_b32_e32 v0, v0, v22349; GFX11-NEXT: v_or_b32_e32 v1, v1, v32350; GFX11-NEXT: s_setpc_b64 s[30:31]2351;2352; GFX12-LABEL: test_vector_reduce_or_v2i64:2353; GFX12: ; %bb.0: ; %entry2354; GFX12-NEXT: s_wait_loadcnt_dscnt 0x02355; GFX12-NEXT: s_wait_expcnt 0x02356; GFX12-NEXT: s_wait_samplecnt 0x02357; GFX12-NEXT: s_wait_bvhcnt 0x02358; GFX12-NEXT: s_wait_kmcnt 0x02359; GFX12-NEXT: v_or_b32_e32 v0, v0, v22360; GFX12-NEXT: v_or_b32_e32 v1, v1, v32361; GFX12-NEXT: s_setpc_b64 s[30:31]2362entry:2363 %res = call i64 @llvm.vector.reduce.or.v2i64(<2 x i64> %v)2364 ret i64 %res2365}2366 2367define i64 @test_vector_reduce_or_v3i64(<3 x i64> %v) {2368; GFX7-SDAG-LABEL: test_vector_reduce_or_v3i64:2369; GFX7-SDAG: ; %bb.0: ; %entry2370; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2371; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v32372; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22373; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v52374; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v42375; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2376;2377; GFX7-GISEL-LABEL: test_vector_reduce_or_v3i64:2378; GFX7-GISEL: ; %bb.0: ; %entry2379; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2380; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22381; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v32382; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v42383; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v52384; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2385;2386; GFX8-SDAG-LABEL: test_vector_reduce_or_v3i64:2387; GFX8-SDAG: ; %bb.0: ; %entry2388; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2389; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v32390; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22391; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v52392; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v42393; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2394;2395; GFX8-GISEL-LABEL: test_vector_reduce_or_v3i64:2396; GFX8-GISEL: ; %bb.0: ; %entry2397; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2398; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22399; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v32400; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v42401; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v52402; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2403;2404; GFX9-SDAG-LABEL: test_vector_reduce_or_v3i64:2405; GFX9-SDAG: ; %bb.0: ; %entry2406; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2407; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v3, v52408; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v2, v42409; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2410;2411; GFX9-GISEL-LABEL: test_vector_reduce_or_v3i64:2412; GFX9-GISEL: ; %bb.0: ; %entry2413; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2414; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v2, v42415; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v3, v52416; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2417;2418; GFX10-LABEL: test_vector_reduce_or_v3i64:2419; GFX10: ; %bb.0: ; %entry2420; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2421; GFX10-NEXT: v_or3_b32 v0, v0, v2, v42422; GFX10-NEXT: v_or3_b32 v1, v1, v3, v52423; GFX10-NEXT: s_setpc_b64 s[30:31]2424;2425; GFX11-LABEL: test_vector_reduce_or_v3i64:2426; GFX11: ; %bb.0: ; %entry2427; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2428; GFX11-NEXT: v_or3_b32 v0, v0, v2, v42429; GFX11-NEXT: v_or3_b32 v1, v1, v3, v52430; GFX11-NEXT: s_setpc_b64 s[30:31]2431;2432; GFX12-LABEL: test_vector_reduce_or_v3i64:2433; GFX12: ; %bb.0: ; %entry2434; GFX12-NEXT: s_wait_loadcnt_dscnt 0x02435; GFX12-NEXT: s_wait_expcnt 0x02436; GFX12-NEXT: s_wait_samplecnt 0x02437; GFX12-NEXT: s_wait_bvhcnt 0x02438; GFX12-NEXT: s_wait_kmcnt 0x02439; GFX12-NEXT: v_or3_b32 v0, v0, v2, v42440; GFX12-NEXT: v_or3_b32 v1, v1, v3, v52441; GFX12-NEXT: s_setpc_b64 s[30:31]2442entry:2443 %res = call i64 @llvm.vector.reduce.or.v3i64(<3 x i64> %v)2444 ret i64 %res2445}2446 2447define i64 @test_vector_reduce_or_v4i64(<4 x i64> %v) {2448; GFX7-SDAG-LABEL: test_vector_reduce_or_v4i64:2449; GFX7-SDAG: ; %bb.0: ; %entry2450; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2451; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v52452; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v42453; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v72454; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v62455; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v32456; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22457; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2458;2459; GFX7-GISEL-LABEL: test_vector_reduce_or_v4i64:2460; GFX7-GISEL: ; %bb.0: ; %entry2461; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2462; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v42463; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v52464; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v62465; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v72466; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22467; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v32468; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2469;2470; GFX8-SDAG-LABEL: test_vector_reduce_or_v4i64:2471; GFX8-SDAG: ; %bb.0: ; %entry2472; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2473; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v52474; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v42475; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v72476; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v62477; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v32478; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22479; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2480;2481; GFX8-GISEL-LABEL: test_vector_reduce_or_v4i64:2482; GFX8-GISEL: ; %bb.0: ; %entry2483; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2484; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v42485; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v52486; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v62487; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v72488; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22489; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v32490; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2491;2492; GFX9-SDAG-LABEL: test_vector_reduce_or_v4i64:2493; GFX9-SDAG: ; %bb.0: ; %entry2494; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2495; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v72496; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v62497; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32498; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22499; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2500;2501; GFX9-GISEL-LABEL: test_vector_reduce_or_v4i64:2502; GFX9-GISEL: ; %bb.0: ; %entry2503; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2504; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v2, v62505; GFX9-GISEL-NEXT: v_or_b32_e32 v3, v3, v72506; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22507; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32508; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2509;2510; GFX10-LABEL: test_vector_reduce_or_v4i64:2511; GFX10: ; %bb.0: ; %entry2512; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2513; GFX10-NEXT: v_or_b32_e32 v2, v2, v62514; GFX10-NEXT: v_or_b32_e32 v3, v3, v72515; GFX10-NEXT: v_or3_b32 v0, v0, v4, v22516; GFX10-NEXT: v_or3_b32 v1, v1, v5, v32517; GFX10-NEXT: s_setpc_b64 s[30:31]2518;2519; GFX11-LABEL: test_vector_reduce_or_v4i64:2520; GFX11: ; %bb.0: ; %entry2521; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2522; GFX11-NEXT: v_or_b32_e32 v2, v2, v62523; GFX11-NEXT: v_or_b32_e32 v3, v3, v72524; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2525; GFX11-NEXT: v_or3_b32 v0, v0, v4, v22526; GFX11-NEXT: v_or3_b32 v1, v1, v5, v32527; GFX11-NEXT: s_setpc_b64 s[30:31]2528;2529; GFX12-LABEL: test_vector_reduce_or_v4i64:2530; GFX12: ; %bb.0: ; %entry2531; GFX12-NEXT: s_wait_loadcnt_dscnt 0x02532; GFX12-NEXT: s_wait_expcnt 0x02533; GFX12-NEXT: s_wait_samplecnt 0x02534; GFX12-NEXT: s_wait_bvhcnt 0x02535; GFX12-NEXT: s_wait_kmcnt 0x02536; GFX12-NEXT: v_or_b32_e32 v2, v2, v62537; GFX12-NEXT: v_or_b32_e32 v3, v3, v72538; GFX12-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2539; GFX12-NEXT: v_or3_b32 v0, v0, v4, v22540; GFX12-NEXT: v_or3_b32 v1, v1, v5, v32541; GFX12-NEXT: s_setpc_b64 s[30:31]2542entry:2543 %res = call i64 @llvm.vector.reduce.or.v4i64(<4 x i64> %v)2544 ret i64 %res2545}2546 2547define i64 @test_vector_reduce_or_v8i64(<8 x i64> %v) {2548; GFX7-SDAG-LABEL: test_vector_reduce_or_v8i64:2549; GFX7-SDAG: ; %bb.0: ; %entry2550; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2551; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v112552; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v102553; GFX7-SDAG-NEXT: v_or_b32_e32 v7, v7, v152554; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v142555; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v92556; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v82557; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v132558; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v122559; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v52560; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v42561; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v72562; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v62563; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v32564; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22565; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2566;2567; GFX7-GISEL-LABEL: test_vector_reduce_or_v8i64:2568; GFX7-GISEL: ; %bb.0: ; %entry2569; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2570; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v82571; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v92572; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v102573; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v112574; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v122575; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v132576; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v142577; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v152578; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v42579; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v52580; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v62581; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v72582; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22583; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v32584; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2585;2586; GFX8-SDAG-LABEL: test_vector_reduce_or_v8i64:2587; GFX8-SDAG: ; %bb.0: ; %entry2588; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2589; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v112590; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v102591; GFX8-SDAG-NEXT: v_or_b32_e32 v7, v7, v152592; GFX8-SDAG-NEXT: v_or_b32_e32 v6, v6, v142593; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v92594; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v82595; GFX8-SDAG-NEXT: v_or_b32_e32 v5, v5, v132596; GFX8-SDAG-NEXT: v_or_b32_e32 v4, v4, v122597; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v52598; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v42599; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v72600; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v62601; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v32602; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22603; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2604;2605; GFX8-GISEL-LABEL: test_vector_reduce_or_v8i64:2606; GFX8-GISEL: ; %bb.0: ; %entry2607; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2608; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v82609; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v92610; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v102611; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v112612; GFX8-GISEL-NEXT: v_or_b32_e32 v4, v4, v122613; GFX8-GISEL-NEXT: v_or_b32_e32 v5, v5, v132614; GFX8-GISEL-NEXT: v_or_b32_e32 v6, v6, v142615; GFX8-GISEL-NEXT: v_or_b32_e32 v7, v7, v152616; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v42617; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v52618; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v62619; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v72620; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22621; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v32622; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2623;2624; GFX9-SDAG-LABEL: test_vector_reduce_or_v8i64:2625; GFX9-SDAG: ; %bb.0: ; %entry2626; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2627; GFX9-SDAG-NEXT: v_or_b32_e32 v7, v7, v152628; GFX9-SDAG-NEXT: v_or_b32_e32 v6, v6, v142629; GFX9-SDAG-NEXT: v_or_b32_e32 v1, v1, v92630; GFX9-SDAG-NEXT: v_or_b32_e32 v0, v0, v82631; GFX9-SDAG-NEXT: v_or_b32_e32 v5, v5, v132632; GFX9-SDAG-NEXT: v_or_b32_e32 v4, v4, v122633; GFX9-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72634; GFX9-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62635; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32636; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22637; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2638;2639; GFX9-GISEL-LABEL: test_vector_reduce_or_v8i64:2640; GFX9-GISEL: ; %bb.0: ; %entry2641; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2642; GFX9-GISEL-NEXT: v_or_b32_e32 v6, v6, v142643; GFX9-GISEL-NEXT: v_or_b32_e32 v7, v7, v152644; GFX9-GISEL-NEXT: v_or_b32_e32 v0, v0, v82645; GFX9-GISEL-NEXT: v_or_b32_e32 v1, v1, v92646; GFX9-GISEL-NEXT: v_or_b32_e32 v4, v4, v122647; GFX9-GISEL-NEXT: v_or_b32_e32 v5, v5, v132648; GFX9-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62649; GFX9-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72650; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22651; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32652; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2653;2654; GFX10-SDAG-LABEL: test_vector_reduce_or_v8i64:2655; GFX10-SDAG: ; %bb.0: ; %entry2656; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2657; GFX10-SDAG-NEXT: v_or_b32_e32 v6, v6, v142658; GFX10-SDAG-NEXT: v_or_b32_e32 v7, v7, v152659; GFX10-SDAG-NEXT: v_or_b32_e32 v1, v1, v92660; GFX10-SDAG-NEXT: v_or_b32_e32 v0, v0, v82661; GFX10-SDAG-NEXT: v_or_b32_e32 v5, v5, v132662; GFX10-SDAG-NEXT: v_or_b32_e32 v4, v4, v122663; GFX10-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62664; GFX10-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72665; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22666; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32667; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2668;2669; GFX10-GISEL-LABEL: test_vector_reduce_or_v8i64:2670; GFX10-GISEL: ; %bb.0: ; %entry2671; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2672; GFX10-GISEL-NEXT: v_or_b32_e32 v6, v6, v142673; GFX10-GISEL-NEXT: v_or_b32_e32 v7, v7, v152674; GFX10-GISEL-NEXT: v_or_b32_e32 v0, v0, v82675; GFX10-GISEL-NEXT: v_or_b32_e32 v1, v1, v92676; GFX10-GISEL-NEXT: v_or_b32_e32 v4, v4, v122677; GFX10-GISEL-NEXT: v_or_b32_e32 v5, v5, v132678; GFX10-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62679; GFX10-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72680; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22681; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32682; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2683;2684; GFX11-SDAG-LABEL: test_vector_reduce_or_v8i64:2685; GFX11-SDAG: ; %bb.0: ; %entry2686; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2687; GFX11-SDAG-NEXT: v_or_b32_e32 v6, v6, v142688; GFX11-SDAG-NEXT: v_or_b32_e32 v7, v7, v152689; GFX11-SDAG-NEXT: v_or_b32_e32 v1, v1, v92690; GFX11-SDAG-NEXT: v_or_b32_e32 v0, v0, v82691; GFX11-SDAG-NEXT: v_or_b32_e32 v5, v5, v132692; GFX11-SDAG-NEXT: v_or_b32_e32 v4, v4, v122693; GFX11-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62694; GFX11-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72695; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2696; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22697; GFX11-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32698; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2699;2700; GFX11-GISEL-LABEL: test_vector_reduce_or_v8i64:2701; GFX11-GISEL: ; %bb.0: ; %entry2702; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2703; GFX11-GISEL-NEXT: v_or_b32_e32 v6, v6, v142704; GFX11-GISEL-NEXT: v_or_b32_e32 v7, v7, v152705; GFX11-GISEL-NEXT: v_or_b32_e32 v0, v0, v82706; GFX11-GISEL-NEXT: v_or_b32_e32 v1, v1, v92707; GFX11-GISEL-NEXT: v_or_b32_e32 v4, v4, v122708; GFX11-GISEL-NEXT: v_or_b32_e32 v5, v5, v132709; GFX11-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62710; GFX11-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72711; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2712; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22713; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32714; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2715;2716; GFX12-SDAG-LABEL: test_vector_reduce_or_v8i64:2717; GFX12-SDAG: ; %bb.0: ; %entry2718; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02719; GFX12-SDAG-NEXT: s_wait_expcnt 0x02720; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02721; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02722; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02723; GFX12-SDAG-NEXT: v_or_b32_e32 v6, v6, v142724; GFX12-SDAG-NEXT: v_or_b32_e32 v7, v7, v152725; GFX12-SDAG-NEXT: v_or_b32_e32 v1, v1, v92726; GFX12-SDAG-NEXT: v_or_b32_e32 v0, v0, v82727; GFX12-SDAG-NEXT: v_or_b32_e32 v5, v5, v132728; GFX12-SDAG-NEXT: v_or_b32_e32 v4, v4, v122729; GFX12-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62730; GFX12-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72731; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2732; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22733; GFX12-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32734; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2735;2736; GFX12-GISEL-LABEL: test_vector_reduce_or_v8i64:2737; GFX12-GISEL: ; %bb.0: ; %entry2738; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02739; GFX12-GISEL-NEXT: s_wait_expcnt 0x02740; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02741; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02742; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02743; GFX12-GISEL-NEXT: v_or_b32_e32 v6, v6, v142744; GFX12-GISEL-NEXT: v_or_b32_e32 v7, v7, v152745; GFX12-GISEL-NEXT: v_or_b32_e32 v0, v0, v82746; GFX12-GISEL-NEXT: v_or_b32_e32 v1, v1, v92747; GFX12-GISEL-NEXT: v_or_b32_e32 v4, v4, v122748; GFX12-GISEL-NEXT: v_or_b32_e32 v5, v5, v132749; GFX12-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62750; GFX12-GISEL-NEXT: v_or3_b32 v3, v3, v11, v72751; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2752; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22753; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v32754; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2755entry:2756 %res = call i64 @llvm.vector.reduce.or.v8i64(<8 x i64> %v)2757 ret i64 %res2758}2759 2760define i64 @test_vector_reduce_or_v16i64(<16 x i64> %v) {2761; GFX7-SDAG-LABEL: test_vector_reduce_or_v16i64:2762; GFX7-SDAG: ; %bb.0: ; %entry2763; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2764; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v202765; GFX7-SDAG-NEXT: buffer_load_dword v20, off, s[0:3], s322766; GFX7-SDAG-NEXT: v_or_b32_e32 v12, v12, v282767; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v162768; GFX7-SDAG-NEXT: v_or_b32_e32 v8, v8, v242769; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v222770; GFX7-SDAG-NEXT: v_or_b32_e32 v14, v14, v302771; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v182772; GFX7-SDAG-NEXT: v_or_b32_e32 v10, v10, v262773; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v102774; GFX7-SDAG-NEXT: v_or_b32_e32 v6, v6, v142775; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v82776; GFX7-SDAG-NEXT: v_or_b32_e32 v4, v4, v122777; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v42778; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v2, v62779; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v212780; GFX7-SDAG-NEXT: v_or_b32_e32 v13, v13, v292781; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v172782; GFX7-SDAG-NEXT: v_or_b32_e32 v9, v9, v252783; GFX7-SDAG-NEXT: v_or_b32_e32 v7, v7, v232784; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v192785; GFX7-SDAG-NEXT: v_or_b32_e32 v11, v11, v272786; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v22787; GFX7-SDAG-NEXT: v_or_b32_e32 v3, v3, v112788; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v92789; GFX7-SDAG-NEXT: v_or_b32_e32 v5, v5, v132790; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v52791; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0)2792; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v15, v202793; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v7, v22794; GFX7-SDAG-NEXT: v_or_b32_e32 v2, v3, v22795; GFX7-SDAG-NEXT: v_or_b32_e32 v1, v1, v22796; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2797;2798; GFX7-GISEL-LABEL: test_vector_reduce_or_v16i64:2799; GFX7-GISEL: ; %bb.0: ; %entry2800; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2801; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v162802; GFX7-GISEL-NEXT: buffer_load_dword v16, off, s[0:3], s322803; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v182804; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v202805; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v222806; GFX7-GISEL-NEXT: v_or_b32_e32 v8, v8, v242807; GFX7-GISEL-NEXT: v_or_b32_e32 v10, v10, v262808; GFX7-GISEL-NEXT: v_or_b32_e32 v12, v12, v282809; GFX7-GISEL-NEXT: v_or_b32_e32 v14, v14, v302810; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v82811; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v102812; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v122813; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v142814; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v42815; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v62816; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v172817; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v192818; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v212819; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v232820; GFX7-GISEL-NEXT: v_or_b32_e32 v9, v9, v252821; GFX7-GISEL-NEXT: v_or_b32_e32 v11, v11, v272822; GFX7-GISEL-NEXT: v_or_b32_e32 v13, v13, v292823; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v0, v22824; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v92825; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v112826; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v132827; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v52828; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0)2829; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v15, v162830; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v7, v22831; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v3, v22832; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v22833; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2834;2835; GFX8-SDAG-LABEL: test_vector_reduce_or_v16i64:2836; GFX8-SDAG: ; %bb.0: ; %entry2837; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2838; GFX8-SDAG-NEXT: v_or_b32_e32 v4, v4, v202839; GFX8-SDAG-NEXT: buffer_load_dword v20, off, s[0:3], s322840; GFX8-SDAG-NEXT: v_or_b32_e32 v12, v12, v282841; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v162842; GFX8-SDAG-NEXT: v_or_b32_e32 v8, v8, v242843; GFX8-SDAG-NEXT: v_or_b32_e32 v6, v6, v222844; GFX8-SDAG-NEXT: v_or_b32_e32 v14, v14, v302845; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v182846; GFX8-SDAG-NEXT: v_or_b32_e32 v10, v10, v262847; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v102848; GFX8-SDAG-NEXT: v_or_b32_e32 v6, v6, v142849; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v82850; GFX8-SDAG-NEXT: v_or_b32_e32 v4, v4, v122851; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v42852; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v2, v62853; GFX8-SDAG-NEXT: v_or_b32_e32 v5, v5, v212854; GFX8-SDAG-NEXT: v_or_b32_e32 v13, v13, v292855; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v172856; GFX8-SDAG-NEXT: v_or_b32_e32 v9, v9, v252857; GFX8-SDAG-NEXT: v_or_b32_e32 v7, v7, v232858; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v192859; GFX8-SDAG-NEXT: v_or_b32_e32 v11, v11, v272860; GFX8-SDAG-NEXT: v_or_b32_e32 v0, v0, v22861; GFX8-SDAG-NEXT: v_or_b32_e32 v3, v3, v112862; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v92863; GFX8-SDAG-NEXT: v_or_b32_e32 v5, v5, v132864; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v52865; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0)2866; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v15, v202867; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v7, v22868; GFX8-SDAG-NEXT: v_or_b32_e32 v2, v3, v22869; GFX8-SDAG-NEXT: v_or_b32_e32 v1, v1, v22870; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2871;2872; GFX8-GISEL-LABEL: test_vector_reduce_or_v16i64:2873; GFX8-GISEL: ; %bb.0: ; %entry2874; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2875; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v162876; GFX8-GISEL-NEXT: buffer_load_dword v16, off, s[0:3], s322877; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v182878; GFX8-GISEL-NEXT: v_or_b32_e32 v4, v4, v202879; GFX8-GISEL-NEXT: v_or_b32_e32 v6, v6, v222880; GFX8-GISEL-NEXT: v_or_b32_e32 v8, v8, v242881; GFX8-GISEL-NEXT: v_or_b32_e32 v10, v10, v262882; GFX8-GISEL-NEXT: v_or_b32_e32 v12, v12, v282883; GFX8-GISEL-NEXT: v_or_b32_e32 v14, v14, v302884; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v82885; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v102886; GFX8-GISEL-NEXT: v_or_b32_e32 v4, v4, v122887; GFX8-GISEL-NEXT: v_or_b32_e32 v6, v6, v142888; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v42889; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v2, v62890; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v172891; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v192892; GFX8-GISEL-NEXT: v_or_b32_e32 v5, v5, v212893; GFX8-GISEL-NEXT: v_or_b32_e32 v7, v7, v232894; GFX8-GISEL-NEXT: v_or_b32_e32 v9, v9, v252895; GFX8-GISEL-NEXT: v_or_b32_e32 v11, v11, v272896; GFX8-GISEL-NEXT: v_or_b32_e32 v13, v13, v292897; GFX8-GISEL-NEXT: v_or_b32_e32 v0, v0, v22898; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v92899; GFX8-GISEL-NEXT: v_or_b32_e32 v3, v3, v112900; GFX8-GISEL-NEXT: v_or_b32_e32 v5, v5, v132901; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v52902; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0)2903; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v15, v162904; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v7, v22905; GFX8-GISEL-NEXT: v_or_b32_e32 v2, v3, v22906; GFX8-GISEL-NEXT: v_or_b32_e32 v1, v1, v22907; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2908;2909; GFX9-SDAG-LABEL: test_vector_reduce_or_v16i64:2910; GFX9-SDAG: ; %bb.0: ; %entry2911; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2912; GFX9-SDAG-NEXT: scratch_load_dword v31, off, s322913; GFX9-SDAG-NEXT: v_or_b32_e32 v14, v14, v302914; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v2, v182915; GFX9-SDAG-NEXT: v_or_b32_e32 v10, v10, v262916; GFX9-SDAG-NEXT: v_or_b32_e32 v12, v12, v282917; GFX9-SDAG-NEXT: v_or_b32_e32 v8, v8, v242918; GFX9-SDAG-NEXT: v_or3_b32 v6, v6, v22, v142919; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v16, v82920; GFX9-SDAG-NEXT: v_or3_b32 v4, v4, v20, v122921; GFX9-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62922; GFX9-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22923; GFX9-SDAG-NEXT: v_or_b32_e32 v3, v3, v192924; GFX9-SDAG-NEXT: v_or_b32_e32 v11, v11, v272925; GFX9-SDAG-NEXT: v_or_b32_e32 v13, v13, v292926; GFX9-SDAG-NEXT: v_or_b32_e32 v9, v9, v252927; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v17, v92928; GFX9-SDAG-NEXT: v_or3_b32 v5, v5, v21, v132929; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0)2930; GFX9-SDAG-NEXT: v_or_b32_e32 v2, v15, v312931; GFX9-SDAG-NEXT: v_or3_b32 v2, v7, v23, v22932; GFX9-SDAG-NEXT: v_or3_b32 v2, v3, v11, v22933; GFX9-SDAG-NEXT: v_or3_b32 v1, v1, v5, v22934; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2935;2936; GFX9-GISEL-LABEL: test_vector_reduce_or_v16i64:2937; GFX9-GISEL: ; %bb.0: ; %entry2938; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2939; GFX9-GISEL-NEXT: scratch_load_dword v31, off, s322940; GFX9-GISEL-NEXT: v_or_b32_e32 v14, v14, v302941; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v2, v182942; GFX9-GISEL-NEXT: v_or_b32_e32 v8, v8, v242943; GFX9-GISEL-NEXT: v_or_b32_e32 v10, v10, v262944; GFX9-GISEL-NEXT: v_or_b32_e32 v12, v12, v282945; GFX9-GISEL-NEXT: v_or3_b32 v6, v6, v22, v142946; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v16, v82947; GFX9-GISEL-NEXT: v_or3_b32 v4, v4, v20, v122948; GFX9-GISEL-NEXT: v_or3_b32 v2, v2, v10, v62949; GFX9-GISEL-NEXT: v_or3_b32 v0, v0, v4, v22950; GFX9-GISEL-NEXT: v_or_b32_e32 v3, v3, v192951; GFX9-GISEL-NEXT: v_or_b32_e32 v9, v9, v252952; GFX9-GISEL-NEXT: v_or_b32_e32 v11, v11, v272953; GFX9-GISEL-NEXT: v_or_b32_e32 v13, v13, v292954; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v17, v92955; GFX9-GISEL-NEXT: v_or3_b32 v5, v5, v21, v132956; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0)2957; GFX9-GISEL-NEXT: v_or_b32_e32 v2, v15, v312958; GFX9-GISEL-NEXT: v_or3_b32 v2, v7, v23, v22959; GFX9-GISEL-NEXT: v_or3_b32 v2, v3, v11, v22960; GFX9-GISEL-NEXT: v_or3_b32 v1, v1, v5, v22961; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2962;2963; GFX10-SDAG-LABEL: test_vector_reduce_or_v16i64:2964; GFX10-SDAG: ; %bb.0: ; %entry2965; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2966; GFX10-SDAG-NEXT: buffer_load_dword v31, off, s[0:3], s322967; GFX10-SDAG-NEXT: v_or_b32_e32 v14, v14, v302968; GFX10-SDAG-NEXT: v_or_b32_e32 v3, v3, v192969; GFX10-SDAG-NEXT: v_or_b32_e32 v2, v2, v182970; GFX10-SDAG-NEXT: v_or_b32_e32 v11, v11, v272971; GFX10-SDAG-NEXT: v_or_b32_e32 v10, v10, v262972; GFX10-SDAG-NEXT: v_or_b32_e32 v9, v9, v252973; GFX10-SDAG-NEXT: v_or_b32_e32 v13, v13, v292974; GFX10-SDAG-NEXT: v_or_b32_e32 v8, v8, v242975; GFX10-SDAG-NEXT: v_or_b32_e32 v12, v12, v282976; GFX10-SDAG-NEXT: v_or3_b32 v6, v6, v22, v142977; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v17, v92978; GFX10-SDAG-NEXT: v_or3_b32 v5, v5, v21, v132979; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v16, v82980; GFX10-SDAG-NEXT: v_or3_b32 v4, v4, v20, v122981; GFX10-SDAG-NEXT: v_or3_b32 v2, v2, v10, v62982; GFX10-SDAG-NEXT: v_or3_b32 v0, v0, v4, v22983; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0)2984; GFX10-SDAG-NEXT: v_or_b32_e32 v15, v15, v312985; GFX10-SDAG-NEXT: v_or3_b32 v7, v7, v23, v152986; GFX10-SDAG-NEXT: v_or3_b32 v3, v3, v11, v72987; GFX10-SDAG-NEXT: v_or3_b32 v1, v1, v5, v32988; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2989;2990; GFX10-GISEL-LABEL: test_vector_reduce_or_v16i64:2991; GFX10-GISEL: ; %bb.0: ; %entry2992; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2993; GFX10-GISEL-NEXT: buffer_load_dword v31, off, s[0:3], s322994; GFX10-GISEL-NEXT: v_or_b32_e32 v14, v14, v302995; GFX10-GISEL-NEXT: v_or_b32_e32 v2, v2, v182996; GFX10-GISEL-NEXT: v_or_b32_e32 v3, v3, v192997; GFX10-GISEL-NEXT: v_or_b32_e32 v8, v8, v242998; GFX10-GISEL-NEXT: v_or_b32_e32 v9, v9, v252999; GFX10-GISEL-NEXT: v_or_b32_e32 v10, v10, v263000; GFX10-GISEL-NEXT: v_or_b32_e32 v11, v11, v273001; GFX10-GISEL-NEXT: v_or_b32_e32 v12, v12, v283002; GFX10-GISEL-NEXT: v_or_b32_e32 v13, v13, v293003; GFX10-GISEL-NEXT: v_or3_b32 v6, v6, v22, v143004; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v16, v83005; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v17, v93006; GFX10-GISEL-NEXT: v_or3_b32 v4, v4, v20, v123007; GFX10-GISEL-NEXT: v_or3_b32 v5, v5, v21, v133008; GFX10-GISEL-NEXT: v_or3_b32 v2, v2, v10, v63009; GFX10-GISEL-NEXT: v_or3_b32 v0, v0, v4, v23010; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0)3011; GFX10-GISEL-NEXT: v_or_b32_e32 v15, v15, v313012; GFX10-GISEL-NEXT: v_or3_b32 v7, v7, v23, v153013; GFX10-GISEL-NEXT: v_or3_b32 v3, v3, v11, v73014; GFX10-GISEL-NEXT: v_or3_b32 v1, v1, v5, v33015; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]3016;3017; GFX11-SDAG-LABEL: test_vector_reduce_or_v16i64:3018; GFX11-SDAG: ; %bb.0: ; %entry3019; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3020; GFX11-SDAG-NEXT: scratch_load_b32 v31, off, s323021; GFX11-SDAG-NEXT: v_or_b32_e32 v14, v14, v303022; GFX11-SDAG-NEXT: v_or_b32_e32 v3, v3, v193023; GFX11-SDAG-NEXT: v_or_b32_e32 v2, v2, v183024; GFX11-SDAG-NEXT: v_or_b32_e32 v11, v11, v273025; GFX11-SDAG-NEXT: v_or_b32_e32 v10, v10, v263026; GFX11-SDAG-NEXT: v_or_b32_e32 v9, v9, v253027; GFX11-SDAG-NEXT: v_or_b32_e32 v13, v13, v293028; GFX11-SDAG-NEXT: v_or_b32_e32 v8, v8, v243029; GFX11-SDAG-NEXT: v_or_b32_e32 v12, v12, v283030; GFX11-SDAG-NEXT: v_or3_b32 v6, v6, v22, v143031; GFX11-SDAG-NEXT: v_or3_b32 v1, v1, v17, v93032; GFX11-SDAG-NEXT: v_or3_b32 v5, v5, v21, v133033; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v16, v83034; GFX11-SDAG-NEXT: v_or3_b32 v4, v4, v20, v123035; GFX11-SDAG-NEXT: v_or3_b32 v2, v2, v10, v63036; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3037; GFX11-SDAG-NEXT: v_or3_b32 v0, v0, v4, v23038; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0)3039; GFX11-SDAG-NEXT: v_or_b32_e32 v15, v15, v313040; GFX11-SDAG-NEXT: v_or3_b32 v7, v7, v23, v153041; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3042; GFX11-SDAG-NEXT: v_or3_b32 v3, v3, v11, v73043; GFX11-SDAG-NEXT: v_or3_b32 v1, v1, v5, v33044; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]3045;3046; GFX11-GISEL-LABEL: test_vector_reduce_or_v16i64:3047; GFX11-GISEL: ; %bb.0: ; %entry3048; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3049; GFX11-GISEL-NEXT: scratch_load_b32 v31, off, s323050; GFX11-GISEL-NEXT: v_or_b32_e32 v14, v14, v303051; GFX11-GISEL-NEXT: v_or_b32_e32 v2, v2, v183052; GFX11-GISEL-NEXT: v_or_b32_e32 v3, v3, v193053; GFX11-GISEL-NEXT: v_or_b32_e32 v8, v8, v243054; GFX11-GISEL-NEXT: v_or_b32_e32 v9, v9, v253055; GFX11-GISEL-NEXT: v_or_b32_e32 v10, v10, v263056; GFX11-GISEL-NEXT: v_or_b32_e32 v11, v11, v273057; GFX11-GISEL-NEXT: v_or_b32_e32 v12, v12, v283058; GFX11-GISEL-NEXT: v_or_b32_e32 v13, v13, v293059; GFX11-GISEL-NEXT: v_or3_b32 v6, v6, v22, v143060; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v16, v83061; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v17, v93062; GFX11-GISEL-NEXT: v_or3_b32 v4, v4, v20, v123063; GFX11-GISEL-NEXT: v_or3_b32 v5, v5, v21, v133064; GFX11-GISEL-NEXT: v_or3_b32 v2, v2, v10, v63065; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3066; GFX11-GISEL-NEXT: v_or3_b32 v0, v0, v4, v23067; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0)3068; GFX11-GISEL-NEXT: v_or_b32_e32 v15, v15, v313069; GFX11-GISEL-NEXT: v_or3_b32 v7, v7, v23, v153070; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3071; GFX11-GISEL-NEXT: v_or3_b32 v3, v3, v11, v73072; GFX11-GISEL-NEXT: v_or3_b32 v1, v1, v5, v33073; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]3074;3075; GFX12-SDAG-LABEL: test_vector_reduce_or_v16i64:3076; GFX12-SDAG: ; %bb.0: ; %entry3077; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x03078; GFX12-SDAG-NEXT: s_wait_expcnt 0x03079; GFX12-SDAG-NEXT: s_wait_samplecnt 0x03080; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x03081; GFX12-SDAG-NEXT: s_wait_kmcnt 0x03082; GFX12-SDAG-NEXT: scratch_load_b32 v31, off, s323083; GFX12-SDAG-NEXT: v_or_b32_e32 v14, v14, v303084; GFX12-SDAG-NEXT: v_or_b32_e32 v3, v3, v193085; GFX12-SDAG-NEXT: v_or_b32_e32 v2, v2, v183086; GFX12-SDAG-NEXT: v_or_b32_e32 v11, v11, v273087; GFX12-SDAG-NEXT: v_or_b32_e32 v10, v10, v263088; GFX12-SDAG-NEXT: v_or_b32_e32 v9, v9, v253089; GFX12-SDAG-NEXT: v_or_b32_e32 v13, v13, v293090; GFX12-SDAG-NEXT: v_or_b32_e32 v8, v8, v243091; GFX12-SDAG-NEXT: v_or_b32_e32 v12, v12, v283092; GFX12-SDAG-NEXT: v_or3_b32 v6, v6, v22, v143093; GFX12-SDAG-NEXT: v_or3_b32 v1, v1, v17, v93094; GFX12-SDAG-NEXT: v_or3_b32 v5, v5, v21, v133095; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v16, v83096; GFX12-SDAG-NEXT: v_or3_b32 v4, v4, v20, v123097; GFX12-SDAG-NEXT: v_or3_b32 v2, v2, v10, v63098; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3099; GFX12-SDAG-NEXT: v_or3_b32 v0, v0, v4, v23100; GFX12-SDAG-NEXT: s_wait_loadcnt 0x03101; GFX12-SDAG-NEXT: v_or_b32_e32 v15, v15, v313102; GFX12-SDAG-NEXT: v_or3_b32 v7, v7, v23, v153103; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3104; GFX12-SDAG-NEXT: v_or3_b32 v3, v3, v11, v73105; GFX12-SDAG-NEXT: v_or3_b32 v1, v1, v5, v33106; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]3107;3108; GFX12-GISEL-LABEL: test_vector_reduce_or_v16i64:3109; GFX12-GISEL: ; %bb.0: ; %entry3110; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x03111; GFX12-GISEL-NEXT: s_wait_expcnt 0x03112; GFX12-GISEL-NEXT: s_wait_samplecnt 0x03113; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x03114; GFX12-GISEL-NEXT: s_wait_kmcnt 0x03115; GFX12-GISEL-NEXT: scratch_load_b32 v31, off, s323116; GFX12-GISEL-NEXT: v_or_b32_e32 v14, v14, v303117; GFX12-GISEL-NEXT: v_or_b32_e32 v2, v2, v183118; GFX12-GISEL-NEXT: v_or_b32_e32 v3, v3, v193119; GFX12-GISEL-NEXT: v_or_b32_e32 v8, v8, v243120; GFX12-GISEL-NEXT: v_or_b32_e32 v9, v9, v253121; GFX12-GISEL-NEXT: v_or_b32_e32 v10, v10, v263122; GFX12-GISEL-NEXT: v_or_b32_e32 v11, v11, v273123; GFX12-GISEL-NEXT: v_or_b32_e32 v12, v12, v283124; GFX12-GISEL-NEXT: v_or_b32_e32 v13, v13, v293125; GFX12-GISEL-NEXT: v_or3_b32 v6, v6, v22, v143126; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v16, v83127; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v17, v93128; GFX12-GISEL-NEXT: v_or3_b32 v4, v4, v20, v123129; GFX12-GISEL-NEXT: v_or3_b32 v5, v5, v21, v133130; GFX12-GISEL-NEXT: v_or3_b32 v2, v2, v10, v63131; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3132; GFX12-GISEL-NEXT: v_or3_b32 v0, v0, v4, v23133; GFX12-GISEL-NEXT: s_wait_loadcnt 0x03134; GFX12-GISEL-NEXT: v_or_b32_e32 v15, v15, v313135; GFX12-GISEL-NEXT: v_or3_b32 v7, v7, v23, v153136; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3137; GFX12-GISEL-NEXT: v_or3_b32 v3, v3, v11, v73138; GFX12-GISEL-NEXT: v_or3_b32 v1, v1, v5, v33139; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]3140entry:3141 %res = call i64 @llvm.vector.reduce.or.v16i64(<16 x i64> %v)3142 ret i64 %res3143}3144 3145declare i8 @llvm.vector.reduce.or.v2i8(<2 x i8>)3146declare i8 @llvm.vector.reduce.or.v3i8(<3 x i8>)3147declare i8 @llvm.vector.reduce.or.v4i8(<4 x i8>)3148declare i8 @llvm.vector.reduce.or.v8i8(<8 x i8>)3149declare i8 @llvm.vector.reduce.or.v16i8(<16 x i8>)3150 3151declare i16 @llvm.vector.reduce.or.v2i16(<2 x i16>)3152declare i16 @llvm.vector.reduce.or.v3i16(<3 x i16>)3153declare i16 @llvm.vector.reduce.or.v4i16(<4 x i16>)3154declare i16 @llvm.vector.reduce.or.v8i16(<8 x i16>)3155declare i16 @llvm.vector.reduce.or.v16i16(<16 x i16>)3156 3157declare i32 @llvm.vector.reduce.or.v2i32(<2 x i32>)3158declare i32 @llvm.vector.reduce.or.v3i32(<3 x i32>)3159declare i32 @llvm.vector.reduce.or.v4i32(<4 x i32>)3160declare i32 @llvm.vector.reduce.or.v8i32(<8 x i32>)3161declare i32 @llvm.vector.reduce.or.v16i32(<16 x i32>)3162 3163declare i64 @llvm.vector.reduce.or.v2i64(<2 x i64>)3164declare i64 @llvm.vector.reduce.or.v3i64(<3 x i64>)3165declare i64 @llvm.vector.reduce.or.v4i64(<4 x i64>)3166declare i64 @llvm.vector.reduce.or.v8i64(<8 x i64>)3167declare i64 @llvm.vector.reduce.or.v16i64(<16 x i64>)3168;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:3169; GFX11-GISEL-FAKE16: {{.*}}3170; GFX12-GISEL-FAKE16: {{.*}}3171