3302 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_xor_v2i8(<2 x i8> %v) {21; GFX7-SDAG-LABEL: test_vector_reduce_xor_v2i8:22; GFX7-SDAG: ; %bb.0: ; %entry23; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)24; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v125; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v026; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]27;28; GFX7-GISEL-LABEL: test_vector_reduce_xor_v2i8:29; GFX7-GISEL: ; %bb.0: ; %entry30; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)31; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v132; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]33;34; GFX8-SDAG-LABEL: test_vector_reduce_xor_v2i8:35; GFX8-SDAG: ; %bb.0: ; %entry36; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)37; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v138; GFX8-SDAG-NEXT: v_xor_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_139; GFX8-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD40; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]41;42; GFX8-GISEL-LABEL: test_vector_reduce_xor_v2i8:43; GFX8-GISEL: ; %bb.0: ; %entry44; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)45; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v146; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]47;48; GFX9-SDAG-LABEL: test_vector_reduce_xor_v2i8:49; GFX9-SDAG: ; %bb.0: ; %entry50; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)51; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v152; GFX9-SDAG-NEXT: v_xor_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_153; GFX9-SDAG-NEXT: s_nop 054; GFX9-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD55; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]56;57; GFX9-GISEL-LABEL: test_vector_reduce_xor_v2i8:58; GFX9-GISEL: ; %bb.0: ; %entry59; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)60; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v161; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]62;63; GFX10-SDAG-LABEL: test_vector_reduce_xor_v2i8:64; GFX10-SDAG: ; %bb.0: ; %entry65; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)66; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v167; GFX10-SDAG-NEXT: v_xor_b32_sdwa v1, v1, v1 dst_sel:BYTE_1 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_168; GFX10-SDAG-NEXT: v_or_b32_sdwa v0, v0, v1 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:DWORD69; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]70;71; GFX10-GISEL-LABEL: test_vector_reduce_xor_v2i8:72; GFX10-GISEL: ; %bb.0: ; %entry73; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)74; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v175; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]76;77; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v2i8:78; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry79; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)80; GFX11-SDAG-TRUE16-NEXT: v_lshrrev_b16 v0.h, 8, v1.l81; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l82; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)83; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v1.l, v0.h84; GFX11-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l85; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)86; GFX11-SDAG-TRUE16-NEXT: v_lshlrev_b16 v0.h, 8, v0.h87; GFX11-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h88; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]89;90; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v2i8:91; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry92; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)93; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b16 v2, 8, v194; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v195; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)96; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v297; GFX11-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v098; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)99; GFX11-SDAG-FAKE16-NEXT: v_lshlrev_b16 v1, 8, v1100; GFX11-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1101; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]102;103; GFX11-GISEL-LABEL: test_vector_reduce_xor_v2i8:104; GFX11-GISEL: ; %bb.0: ; %entry105; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)106; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1107; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]108;109; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v2i8:110; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry111; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0112; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0113; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0114; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0115; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0116; GFX12-SDAG-TRUE16-NEXT: v_lshrrev_b16 v0.h, 8, v1.l117; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l118; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)119; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v1.l, v0.h120; GFX12-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l121; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)122; GFX12-SDAG-TRUE16-NEXT: v_lshlrev_b16 v0.h, 8, v0.h123; GFX12-SDAG-TRUE16-NEXT: v_or_b16 v0.l, v0.l, v0.h124; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]125;126; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v2i8:127; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry128; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0129; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0130; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0131; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0132; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0133; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b16 v2, 8, v1134; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1135; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)136; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v2137; GFX12-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0138; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)139; GFX12-SDAG-FAKE16-NEXT: v_lshlrev_b16 v1, 8, v1140; GFX12-SDAG-FAKE16-NEXT: v_or_b32_e32 v0, v0, v1141; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]142;143; GFX12-GISEL-LABEL: test_vector_reduce_xor_v2i8:144; GFX12-GISEL: ; %bb.0: ; %entry145; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0146; GFX12-GISEL-NEXT: s_wait_expcnt 0x0147; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0148; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0149; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0150; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1151; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]152entry:153 %res = call i8 @llvm.vector.reduce.xor.v2i8(<2 x i8> %v)154 ret i8 %res155}156 157define i8 @test_vector_reduce_xor_v3i8(<3 x i8> %v) {158; GFX7-SDAG-LABEL: test_vector_reduce_xor_v3i8:159; GFX7-SDAG: ; %bb.0: ; %entry160; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)161; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2162; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1163; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]164;165; GFX7-GISEL-LABEL: test_vector_reduce_xor_v3i8:166; GFX7-GISEL: ; %bb.0: ; %entry167; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)168; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1169; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2170; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]171;172; GFX8-SDAG-LABEL: test_vector_reduce_xor_v3i8:173; GFX8-SDAG: ; %bb.0: ; %entry174; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)175; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2176; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1177; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]178;179; GFX8-GISEL-LABEL: test_vector_reduce_xor_v3i8:180; GFX8-GISEL: ; %bb.0: ; %entry181; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)182; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1183; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2184; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]185;186; GFX9-SDAG-LABEL: test_vector_reduce_xor_v3i8:187; GFX9-SDAG: ; %bb.0: ; %entry188; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)189; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2190; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1191; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]192;193; GFX9-GISEL-LABEL: test_vector_reduce_xor_v3i8:194; GFX9-GISEL: ; %bb.0: ; %entry195; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)196; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1197; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2198; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]199;200; GFX10-SDAG-LABEL: test_vector_reduce_xor_v3i8:201; GFX10-SDAG: ; %bb.0: ; %entry202; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)203; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2204; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1205; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]206;207; GFX10-GISEL-LABEL: test_vector_reduce_xor_v3i8:208; GFX10-GISEL: ; %bb.0: ; %entry209; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)210; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v1, v2211; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]212;213; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_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_xor_b16 v0.l, v0.l, v2.l217; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)218; GFX11-SDAG-TRUE16-NEXT: v_xor_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_xor_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_xor_b32_e32 v0, v0, v2225; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)226; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1227; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]228;229; GFX11-GISEL-LABEL: test_vector_reduce_xor_v3i8:230; GFX11-GISEL: ; %bb.0: ; %entry231; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)232; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v1, v2233; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]234;235; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_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_xor_b16 v0.l, v0.l, v2.l243; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)244; GFX12-SDAG-TRUE16-NEXT: v_xor_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_xor_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_xor_b32_e32 v0, v0, v2255; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)256; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1257; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]258;259; GFX12-GISEL-LABEL: test_vector_reduce_xor_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_xor3_b32 v0, v0, v1, v2267; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]268entry:269 %res = call i8 @llvm.vector.reduce.xor.v3i8(<3 x i8> %v)270 ret i8 %res271}272 273define i8 @test_vector_reduce_xor_v4i8(<4 x i8> %v) {274; GFX7-SDAG-LABEL: test_vector_reduce_xor_v4i8:275; GFX7-SDAG: ; %bb.0: ; %entry276; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)277; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3278; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2279; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1280; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0281; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]282;283; GFX7-GISEL-LABEL: test_vector_reduce_xor_v4i8:284; GFX7-GISEL: ; %bb.0: ; %entry285; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)286; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2287; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3288; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1289; GFX7-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8290; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]291;292; GFX8-SDAG-LABEL: test_vector_reduce_xor_v4i8:293; GFX8-SDAG: ; %bb.0: ; %entry294; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)295; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3296; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2297; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1298; GFX8-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0299; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]300;301; GFX8-GISEL-LABEL: test_vector_reduce_xor_v4i8:302; GFX8-GISEL: ; %bb.0: ; %entry303; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)304; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2305; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3306; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1307; GFX8-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8308; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]309;310; GFX9-SDAG-LABEL: test_vector_reduce_xor_v4i8:311; GFX9-SDAG: ; %bb.0: ; %entry312; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)313; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3314; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2315; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1316; GFX9-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0317; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]318;319; GFX9-GISEL-LABEL: test_vector_reduce_xor_v4i8:320; GFX9-GISEL: ; %bb.0: ; %entry321; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)322; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2323; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3324; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1325; GFX9-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8326; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]327;328; GFX10-SDAG-LABEL: test_vector_reduce_xor_v4i8:329; GFX10-SDAG: ; %bb.0: ; %entry330; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)331; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3332; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2333; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1334; GFX10-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0335; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]336;337; GFX10-GISEL-LABEL: test_vector_reduce_xor_v4i8:338; GFX10-GISEL: ; %bb.0: ; %entry339; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)340; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3341; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1342; GFX10-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8343; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]344;345; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v4i8:346; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry347; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)348; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v1.l, v3.l349; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v2.l350; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)351; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h352; GFX11-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l353; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]354;355; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v4i8:356; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry357; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)358; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3359; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2360; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)361; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1362; GFX11-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0363; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]364;365; GFX11-GISEL-LABEL: test_vector_reduce_xor_v4i8:366; GFX11-GISEL: ; %bb.0: ; %entry367; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)368; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3369; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)370; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1371; GFX11-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8372; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]373;374; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v4i8:375; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry376; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0377; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0378; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0379; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0380; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0381; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v1.l, v3.l382; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v2.l383; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)384; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h385; GFX12-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l386; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]387;388; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v4i8:389; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry390; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0391; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0392; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0393; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0394; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0395; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3396; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2397; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)398; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1399; GFX12-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0400; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]401;402; GFX12-GISEL-LABEL: test_vector_reduce_xor_v4i8:403; GFX12-GISEL: ; %bb.0: ; %entry404; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0405; GFX12-GISEL-NEXT: s_wait_expcnt 0x0406; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0407; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0408; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0409; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3410; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)411; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1412; GFX12-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8413; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]414entry:415 %res = call i8 @llvm.vector.reduce.xor.v4i8(<4 x i8> %v)416 ret i8 %res417}418 419define i8 @test_vector_reduce_xor_v8i8(<8 x i8> %v) {420; GFX7-SDAG-LABEL: test_vector_reduce_xor_v8i8:421; GFX7-SDAG: ; %bb.0: ; %entry422; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)423; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6424; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4425; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7426; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5427; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3428; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2429; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1430; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0431; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]432;433; GFX7-GISEL-LABEL: test_vector_reduce_xor_v8i8:434; GFX7-GISEL: ; %bb.0: ; %entry435; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)436; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4437; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5438; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6439; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7440; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2441; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3442; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1443; GFX7-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8444; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]445;446; GFX8-SDAG-LABEL: test_vector_reduce_xor_v8i8:447; GFX8-SDAG: ; %bb.0: ; %entry448; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)449; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6450; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4451; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7452; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5453; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3454; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2455; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1456; GFX8-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0457; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]458;459; GFX8-GISEL-LABEL: test_vector_reduce_xor_v8i8:460; GFX8-GISEL: ; %bb.0: ; %entry461; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)462; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4463; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5464; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6465; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7466; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2467; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3468; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1469; GFX8-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8470; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]471;472; GFX9-SDAG-LABEL: test_vector_reduce_xor_v8i8:473; GFX9-SDAG: ; %bb.0: ; %entry474; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)475; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6476; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4477; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7478; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5479; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3480; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2481; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1482; GFX9-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0483; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]484;485; GFX9-GISEL-LABEL: test_vector_reduce_xor_v8i8:486; GFX9-GISEL: ; %bb.0: ; %entry487; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)488; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4489; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5490; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6491; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7492; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2493; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3494; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1495; GFX9-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8496; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]497;498; GFX10-SDAG-LABEL: test_vector_reduce_xor_v8i8:499; GFX10-SDAG: ; %bb.0: ; %entry500; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)501; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6502; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7503; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5504; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4505; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3506; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2507; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1508; GFX10-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0509; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]510;511; GFX10-GISEL-LABEL: test_vector_reduce_xor_v8i8:512; GFX10-GISEL: ; %bb.0: ; %entry513; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)514; GFX10-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7515; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4516; GFX10-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6517; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3518; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1519; GFX10-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8520; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]521;522; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v8i8:523; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry524; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)525; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v2.l, v6.l526; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.h, v3.l, v7.l527; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v5.l528; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v4.l529; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)530; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v1.h531; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h532; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)533; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l534; GFX11-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l535; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]536;537; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v8i8:538; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry539; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)540; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v6541; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v7542; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v5543; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v4544; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)545; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3546; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2547; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)548; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1549; GFX11-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0550; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]551;552; GFX11-GISEL-LABEL: test_vector_reduce_xor_v8i8:553; GFX11-GISEL: ; %bb.0: ; %entry554; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)555; GFX11-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7556; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4557; GFX11-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6558; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)559; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3560; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1561; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)562; GFX11-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8563; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]564;565; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v8i8:566; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry567; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0568; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0569; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0570; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0571; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0572; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v2.l, v6.l573; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.h, v3.l, v7.l574; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v5.l575; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v4.l576; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)577; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v1.h578; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h579; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)580; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l581; GFX12-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l582; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]583;584; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v8i8:585; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry586; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0587; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0588; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0589; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0590; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0591; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v6592; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v7593; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v5594; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v4595; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)596; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3597; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2598; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)599; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1600; GFX12-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0601; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]602;603; GFX12-GISEL-LABEL: test_vector_reduce_xor_v8i8:604; GFX12-GISEL: ; %bb.0: ; %entry605; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0606; GFX12-GISEL-NEXT: s_wait_expcnt 0x0607; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0608; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0609; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0610; GFX12-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7611; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4612; GFX12-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6613; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)614; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3615; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1616; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)617; GFX12-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8618; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]619entry:620 %res = call i8 @llvm.vector.reduce.xor.v8i8(<8 x i8> %v)621 ret i8 %res622}623 624define i8 @test_vector_reduce_xor_v16i8(<16 x i8> %v) {625; GFX7-SDAG-LABEL: test_vector_reduce_xor_v16i8:626; GFX7-SDAG: ; %bb.0: ; %entry627; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)628; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v13629; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v9630; GFX7-SDAG-NEXT: v_xor_b32_e32 v7, v7, v15631; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v11632; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v12633; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v8634; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v14635; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v10636; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6637; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4638; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7639; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5640; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3641; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2642; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1643; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0644; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]645;646; GFX7-GISEL-LABEL: test_vector_reduce_xor_v16i8:647; GFX7-GISEL: ; %bb.0: ; %entry648; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)649; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v8650; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9651; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v10652; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v11653; GFX7-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12654; GFX7-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13655; GFX7-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14656; GFX7-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15657; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4658; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5659; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6660; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7661; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2662; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3663; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1664; GFX7-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8665; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]666;667; GFX8-SDAG-LABEL: test_vector_reduce_xor_v16i8:668; GFX8-SDAG: ; %bb.0: ; %entry669; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)670; GFX8-SDAG-NEXT: v_xor_b32_e32 v5, v5, v13671; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v9672; GFX8-SDAG-NEXT: v_xor_b32_e32 v7, v7, v15673; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v11674; GFX8-SDAG-NEXT: v_xor_b32_e32 v4, v4, v12675; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v8676; GFX8-SDAG-NEXT: v_xor_b32_e32 v6, v6, v14677; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v10678; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6679; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4680; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7681; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5682; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3683; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2684; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1685; GFX8-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0686; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]687;688; GFX8-GISEL-LABEL: test_vector_reduce_xor_v16i8:689; GFX8-GISEL: ; %bb.0: ; %entry690; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)691; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v8692; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9693; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v10694; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v11695; GFX8-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12696; GFX8-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13697; GFX8-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14698; GFX8-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15699; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4700; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5701; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6702; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7703; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2704; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3705; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1706; GFX8-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8707; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]708;709; GFX9-SDAG-LABEL: test_vector_reduce_xor_v16i8:710; GFX9-SDAG: ; %bb.0: ; %entry711; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)712; GFX9-SDAG-NEXT: v_xor_b32_e32 v5, v5, v13713; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v9714; GFX9-SDAG-NEXT: v_xor_b32_e32 v7, v7, v15715; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v11716; GFX9-SDAG-NEXT: v_xor_b32_e32 v4, v4, v12717; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v8718; GFX9-SDAG-NEXT: v_xor_b32_e32 v6, v6, v14719; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v10720; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6721; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4722; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7723; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5724; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3725; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2726; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1727; GFX9-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0728; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]729;730; GFX9-GISEL-LABEL: test_vector_reduce_xor_v16i8:731; GFX9-GISEL: ; %bb.0: ; %entry732; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)733; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v8734; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9735; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v10736; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v11737; GFX9-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12738; GFX9-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13739; GFX9-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14740; GFX9-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15741; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v4742; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v5743; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v6744; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v7745; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v2746; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v3747; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1748; GFX9-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8749; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]750;751; GFX10-SDAG-LABEL: test_vector_reduce_xor_v16i8:752; GFX10-SDAG: ; %bb.0: ; %entry753; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)754; GFX10-SDAG-NEXT: v_xor_b32_e32 v5, v5, v13755; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v9756; GFX10-SDAG-NEXT: v_xor_b32_e32 v7, v7, v15757; GFX10-SDAG-NEXT: v_xor_b32_e32 v6, v6, v14758; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v10759; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v11760; GFX10-SDAG-NEXT: v_xor_b32_e32 v4, v4, v12761; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v8762; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v5763; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v6764; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v7765; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v4766; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v3767; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v2768; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1769; GFX10-SDAG-NEXT: v_and_b32_e32 v0, 0xff, v0770; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]771;772; GFX10-GISEL-LABEL: test_vector_reduce_xor_v16i8:773; GFX10-GISEL: ; %bb.0: ; %entry774; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)775; GFX10-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15776; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9777; GFX10-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12778; GFX10-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13779; GFX10-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14780; GFX10-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v7781; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v4782; GFX10-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v6783; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3784; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1785; GFX10-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8786; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]787;788; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v16i8:789; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry790; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)791; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.h, v5.l, v13.l792; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v9.l793; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v5.l, v7.l, v15.l794; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v6.l, v14.l795; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v2.l, v2.l, v10.l796; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v2.h, v3.l, v11.l797; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v3.l, v4.l, v12.l798; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v8.l799; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v1.h800; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v2.l, v0.h801; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v2.l, v2.h, v5.l802; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)803; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v3.l804; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v2.l805; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)806; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h807; GFX11-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l808; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)809; GFX11-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l810; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]811;812; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v16i8:813; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry814; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)815; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v5, v5, v13816; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v9817; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v7, v7, v15818; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v6, v6, v14819; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v10820; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v11821; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v4, v4, v12822; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v8823; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v5824; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v6825; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v7826; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)827; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v4828; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3829; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)830; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2831; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1832; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)833; GFX11-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0834; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]835;836; GFX11-GISEL-LABEL: test_vector_reduce_xor_v16i8:837; GFX11-GISEL: ; %bb.0: ; %entry838; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)839; GFX11-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15840; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9841; GFX11-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12842; GFX11-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13843; GFX11-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14844; GFX11-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v7845; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)846; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v4847; GFX11-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v6848; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)849; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3850; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1851; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)852; GFX11-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8853; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]854;855; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v16i8:856; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry857; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x0858; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x0859; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x0860; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x0861; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x0862; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.h, v5.l, v13.l863; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v9.l864; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v5.l, v7.l, v15.l865; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v6.l, v14.l866; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v2.l, v2.l, v10.l867; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v2.h, v3.l, v11.l868; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v3.l, v4.l, v12.l869; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v8.l870; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v1.h871; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.h, v2.l, v0.h872; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v2.l, v2.h, v5.l873; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)874; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v3.l875; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v1.l, v1.l, v2.l876; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)877; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v0.h878; GFX12-SDAG-TRUE16-NEXT: v_xor_b16 v0.l, v0.l, v1.l879; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)880; GFX12-SDAG-TRUE16-NEXT: v_and_b16 v0.l, 0xff, v0.l881; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]882;883; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v16i8:884; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry885; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0886; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x0887; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x0888; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x0889; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x0890; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v5, v5, v13891; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v9892; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v7, v7, v15893; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v6, v6, v14894; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v10895; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v11896; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v4, v4, v12897; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v8898; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v5899; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v6900; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v7901; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2)902; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v4903; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v3904; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)905; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v2906; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v1907; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)908; GFX12-SDAG-FAKE16-NEXT: v_and_b32_e32 v0, 0xff, v0909; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]910;911; GFX12-GISEL-LABEL: test_vector_reduce_xor_v16i8:912; GFX12-GISEL: ; %bb.0: ; %entry913; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0914; GFX12-GISEL-NEXT: s_wait_expcnt 0x0915; GFX12-GISEL-NEXT: s_wait_samplecnt 0x0916; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x0917; GFX12-GISEL-NEXT: s_wait_kmcnt 0x0918; GFX12-GISEL-NEXT: v_xor_b32_e32 v7, v7, v15919; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v9920; GFX12-GISEL-NEXT: v_xor_b32_e32 v4, v4, v12921; GFX12-GISEL-NEXT: v_xor_b32_e32 v5, v5, v13922; GFX12-GISEL-NEXT: v_xor_b32_e32 v6, v6, v14923; GFX12-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v7924; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)925; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v4926; GFX12-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v6927; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)928; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v3929; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v1930; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)931; GFX12-GISEL-NEXT: v_bfe_u32 v0, v0, 0, 8932; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]933entry:934 %res = call i8 @llvm.vector.reduce.xor.v16i8(<16 x i8> %v)935 ret i8 %res936}937 938define i16 @test_vector_reduce_xor_v2i16(<2 x i16> %v) {939; GFX7-SDAG-LABEL: test_vector_reduce_xor_v2i16:940; GFX7-SDAG: ; %bb.0: ; %entry941; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)942; GFX7-SDAG-NEXT: v_lshrrev_b32_e32 v2, 16, v1943; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1944; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v2945; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v0946; GFX7-SDAG-NEXT: v_lshlrev_b32_e32 v1, 16, v1947; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v1948; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]949;950; GFX7-GISEL-LABEL: test_vector_reduce_xor_v2i16:951; GFX7-GISEL: ; %bb.0: ; %entry952; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)953; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v1954; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v0955; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v2, v0956; GFX7-GISEL-NEXT: v_and_b32_e32 v1, 0xffff, v1957; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v1958; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]959;960; GFX8-LABEL: test_vector_reduce_xor_v2i16:961; GFX8: ; %bb.0: ; %entry962; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)963; GFX8-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_1964; GFX8-NEXT: s_setpc_b64 s[30:31]965;966; GFX9-SDAG-LABEL: test_vector_reduce_xor_v2i16:967; GFX9-SDAG: ; %bb.0: ; %entry968; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)969; GFX9-SDAG-NEXT: v_alignbit_b32 v1, s0, v0, 16970; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1971; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]972;973; GFX9-GISEL-LABEL: test_vector_reduce_xor_v2i16:974; GFX9-GISEL: ; %bb.0: ; %entry975; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)976; GFX9-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_1977; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]978;979; GFX10-SDAG-LABEL: test_vector_reduce_xor_v2i16:980; GFX10-SDAG: ; %bb.0: ; %entry981; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)982; GFX10-SDAG-NEXT: v_alignbit_b32 v1, s4, v0, 16983; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v1984; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]985;986; GFX10-GISEL-LABEL: test_vector_reduce_xor_v2i16:987; GFX10-GISEL: ; %bb.0: ; %entry988; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)989; GFX10-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_1990; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]991;992; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v2i16:993; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry994; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)995; GFX11-SDAG-TRUE16-NEXT: v_mov_b32_e32 v1, s0996; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h997; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)998; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, v1.l999; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v21000; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1001;1002; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v2i16:1003; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1004; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1005; GFX11-SDAG-FAKE16-NEXT: v_alignbit_b32 v1, s0, v0, 161006; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1007; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11008; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1009;1010; GFX11-GISEL-LABEL: test_vector_reduce_xor_v2i16:1011; GFX11-GISEL: ; %bb.0: ; %entry1012; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1013; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01014; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1015; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11016; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1017;1018; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v2i16:1019; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1020; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01021; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01022; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01023; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01024; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01025; GFX12-SDAG-TRUE16-NEXT: v_mov_b32_e32 v1, s01026; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1027; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1028; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, v1.l1029; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v21030; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1031;1032; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v2i16:1033; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1034; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01035; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01036; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01037; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01038; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01039; GFX12-SDAG-FAKE16-NEXT: v_alignbit_b32 v1, s0, v0, 161040; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1041; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11042; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1043;1044; GFX12-GISEL-LABEL: test_vector_reduce_xor_v2i16:1045; GFX12-GISEL: ; %bb.0: ; %entry1046; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01047; GFX12-GISEL-NEXT: s_wait_expcnt 0x01048; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01049; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01050; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01051; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01052; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1053; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11054; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1055entry:1056 %res = call i16 @llvm.vector.reduce.xor.v2i16(<2 x i16> %v)1057 ret i16 %res1058}1059 1060define i16 @test_vector_reduce_xor_v3i16(<3 x i16> %v) {1061; GFX7-SDAG-LABEL: test_vector_reduce_xor_v3i16:1062; GFX7-SDAG: ; %bb.0: ; %entry1063; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1064; GFX7-SDAG-NEXT: v_lshlrev_b32_e32 v1, 16, v11065; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01066; GFX7-SDAG-NEXT: v_or_b32_e32 v0, v0, v11067; GFX7-SDAG-NEXT: v_and_b32_e32 v1, 0xffff, v21068; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11069; GFX7-SDAG-NEXT: v_lshrrev_b32_e32 v1, 16, v01070; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11071; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1072;1073; GFX7-GISEL-LABEL: test_vector_reduce_xor_v3i16:1074; GFX7-GISEL: ; %bb.0: ; %entry1075; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1076; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11077; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21078; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1079;1080; GFX8-LABEL: test_vector_reduce_xor_v3i16:1081; GFX8: ; %bb.0: ; %entry1082; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1083; GFX8-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11084; GFX8-NEXT: v_xor_b32_e32 v0, v0, v11085; GFX8-NEXT: s_setpc_b64 s[30:31]1086;1087; GFX9-LABEL: test_vector_reduce_xor_v3i16:1088; GFX9: ; %bb.0: ; %entry1089; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1090; GFX9-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11091; GFX9-NEXT: v_xor_b32_e32 v0, v0, v11092; GFX9-NEXT: s_setpc_b64 s[30:31]1093;1094; GFX10-LABEL: test_vector_reduce_xor_v3i16:1095; GFX10: ; %bb.0: ; %entry1096; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1097; GFX10-NEXT: v_lshrrev_b32_e32 v2, 16, v01098; GFX10-NEXT: v_xor3_b32 v0, v0, v2, v11099; GFX10-NEXT: s_setpc_b64 s[30:31]1100;1101; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v3i16:1102; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1103; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1104; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, 01105; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1106; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1107; GFX11-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11108; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1109;1110; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v3i16:1111; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1112; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1113; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v2, 16, v01114; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1115; GFX11-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11116; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1117;1118; GFX11-GISEL-LABEL: test_vector_reduce_xor_v3i16:1119; GFX11-GISEL: ; %bb.0: ; %entry1120; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1121; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v01122; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1123; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v11124; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1125;1126; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v3i16:1127; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1128; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01129; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01130; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01131; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01132; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01133; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.h, 01134; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v2.l, v0.h1135; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1136; GFX12-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11137; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1138;1139; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v3i16:1140; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1141; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01142; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01143; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01144; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01145; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01146; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v2, 16, v01147; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1148; GFX12-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11149; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1150;1151; GFX12-GISEL-LABEL: test_vector_reduce_xor_v3i16:1152; GFX12-GISEL: ; %bb.0: ; %entry1153; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01154; GFX12-GISEL-NEXT: s_wait_expcnt 0x01155; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01156; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01157; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01158; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v01159; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1160; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v11161; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1162entry:1163 %res = call i16 @llvm.vector.reduce.xor.v3i16(<3 x i16> %v)1164 ret i16 %res1165}1166 1167define i16 @test_vector_reduce_xor_v4i16(<4 x i16> %v) {1168; GFX7-SDAG-LABEL: test_vector_reduce_xor_v4i16:1169; GFX7-SDAG: ; %bb.0: ; %entry1170; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1171; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31172; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21173; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11174; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01175; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1176;1177; GFX7-GISEL-LABEL: test_vector_reduce_xor_v4i16:1178; GFX7-GISEL: ; %bb.0: ; %entry1179; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1180; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11181; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01182; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01183; GFX7-GISEL-NEXT: v_and_b32_e32 v1, 0xffff, v21184; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v31185; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v21186; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21187; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11188; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01189; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11190; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1191;1192; GFX8-SDAG-LABEL: test_vector_reduce_xor_v4i16:1193; GFX8-SDAG: ; %bb.0: ; %entry1194; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1195; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11196; GFX8-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11197; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1198;1199; GFX8-GISEL-LABEL: test_vector_reduce_xor_v4i16:1200; GFX8-GISEL: ; %bb.0: ; %entry1201; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1202; GFX8-GISEL-NEXT: v_lshrrev_b32_e32 v2, 16, v11203; GFX8-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v21204; GFX8-GISEL-NEXT: v_or_b32_sdwa v1, v1, v2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD1205; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11206; GFX8-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11207; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1208;1209; GFX9-LABEL: test_vector_reduce_xor_v4i16:1210; GFX9: ; %bb.0: ; %entry1211; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1212; GFX9-NEXT: v_xor_b32_e32 v0, v0, v11213; GFX9-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11214; GFX9-NEXT: s_setpc_b64 s[30:31]1215;1216; GFX10-LABEL: test_vector_reduce_xor_v4i16:1217; GFX10: ; %bb.0: ; %entry1218; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1219; GFX10-NEXT: v_xor_b32_e32 v0, v0, v11220; GFX10-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11221; GFX10-NEXT: s_setpc_b64 s[30:31]1222;1223; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v4i16:1224; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1225; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1226; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11227; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01228; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1229; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1230; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11231; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1232;1233; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v4i16:1234; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1235; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1236; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11237; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1238; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01239; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11240; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1241;1242; GFX11-GISEL-LABEL: test_vector_reduce_xor_v4i16:1243; GFX11-GISEL: ; %bb.0: ; %entry1244; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1245; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11246; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1247; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01248; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11249; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1250;1251; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v4i16:1252; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1253; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01254; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01255; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01256; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01257; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01258; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11259; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01260; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1261; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1262; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11263; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1264;1265; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v4i16:1266; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1267; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01268; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01269; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01270; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01271; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01272; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11273; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1274; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01275; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11276; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1277;1278; GFX12-GISEL-LABEL: test_vector_reduce_xor_v4i16:1279; GFX12-GISEL: ; %bb.0: ; %entry1280; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01281; GFX12-GISEL-NEXT: s_wait_expcnt 0x01282; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01283; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01284; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01285; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11286; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1287; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01288; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11289; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1290entry:1291 %res = call i16 @llvm.vector.reduce.xor.v4i16(<4 x i16> %v)1292 ret i16 %res1293}1294 1295define i16 @test_vector_reduce_xor_v8i16(<8 x i16> %v) {1296; GFX7-SDAG-LABEL: test_vector_reduce_xor_v8i16:1297; GFX7-SDAG: ; %bb.0: ; %entry1298; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1299; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61300; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41301; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71302; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51303; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31304; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21305; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11306; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01307; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1308;1309; GFX7-GISEL-LABEL: test_vector_reduce_xor_v8i16:1310; GFX7-GISEL: ; %bb.0: ; %entry1311; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1312; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11313; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01314; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01315; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v31316; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v21317; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21318; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v51319; GFX7-GISEL-NEXT: v_and_b32_e32 v3, 0xffff, v41320; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v31321; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v3, 16, v71322; GFX7-GISEL-NEXT: v_and_b32_e32 v4, 0xffff, v61323; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v41324; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21325; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31326; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11327; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01328; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11329; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1330;1331; GFX8-SDAG-LABEL: test_vector_reduce_xor_v8i16:1332; GFX8-SDAG: ; %bb.0: ; %entry1333; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1334; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31335; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21336; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11337; GFX8-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11338; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1339;1340; GFX8-GISEL-LABEL: test_vector_reduce_xor_v8i16:1341; GFX8-GISEL: ; %bb.0: ; %entry1342; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1343; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21344; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31345; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11346; GFX8-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11347; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1348;1349; GFX9-SDAG-LABEL: test_vector_reduce_xor_v8i16:1350; GFX9-SDAG: ; %bb.0: ; %entry1351; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1352; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31353; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21354; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11355; GFX9-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11356; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1357;1358; GFX9-GISEL-LABEL: test_vector_reduce_xor_v8i16:1359; GFX9-GISEL: ; %bb.0: ; %entry1360; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1361; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21362; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31363; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11364; GFX9-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11365; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1366;1367; GFX10-SDAG-LABEL: test_vector_reduce_xor_v8i16:1368; GFX10-SDAG: ; %bb.0: ; %entry1369; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1370; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31371; GFX10-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v11372; GFX10-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11373; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1374;1375; GFX10-GISEL-LABEL: test_vector_reduce_xor_v8i16:1376; GFX10-GISEL: ; %bb.0: ; %entry1377; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1378; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21379; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31380; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11381; GFX10-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11382; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1383;1384; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v8i16:1385; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1386; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1387; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v1, v1, v31388; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)1389; GFX11-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11390; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01391; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1392; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1393; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11394; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1395;1396; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v8i16:1397; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1398; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1399; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v31400; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1401; GFX11-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11402; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01403; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1404; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11405; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1406;1407; GFX11-GISEL-LABEL: test_vector_reduce_xor_v8i16:1408; GFX11-GISEL: ; %bb.0: ; %entry1409; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1410; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21411; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31412; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1413; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11414; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01415; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1416; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11417; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1418;1419; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v8i16:1420; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1421; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01422; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01423; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01424; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01425; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01426; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v1, v1, v31427; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)1428; GFX12-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11429; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01430; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1431; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1432; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11433; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1434;1435; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v8i16:1436; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1437; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01438; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01439; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01440; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01441; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01442; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v1, v1, v31443; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1444; GFX12-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11445; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01446; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)1447; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11448; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1449;1450; GFX12-GISEL-LABEL: test_vector_reduce_xor_v8i16:1451; GFX12-GISEL: ; %bb.0: ; %entry1452; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01453; GFX12-GISEL-NEXT: s_wait_expcnt 0x01454; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01455; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01456; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01457; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21458; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31459; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1460; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11461; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01462; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1463; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11464; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1465entry:1466 %res = call i16 @llvm.vector.reduce.xor.v8i16(<8 x i16> %v)1467 ret i16 %res1468}1469 1470define i16 @test_vector_reduce_xor_v16i16(<16 x i16> %v) {1471; GFX7-SDAG-LABEL: test_vector_reduce_xor_v16i16:1472; GFX7-SDAG: ; %bb.0: ; %entry1473; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1474; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v131475; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v91476; GFX7-SDAG-NEXT: v_xor_b32_e32 v7, v7, v151477; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v111478; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v121479; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v81480; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v141481; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v101482; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61483; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41484; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71485; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51486; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31487; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21488; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11489; GFX7-SDAG-NEXT: v_and_b32_e32 v0, 0xffff, v01490; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1491;1492; GFX7-GISEL-LABEL: test_vector_reduce_xor_v16i16:1493; GFX7-GISEL: ; %bb.0: ; %entry1494; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1495; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v11496; GFX7-GISEL-NEXT: v_and_b32_e32 v0, 0xffff, v01497; GFX7-GISEL-NEXT: v_or_b32_e32 v0, v1, v01498; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v1, 16, v31499; GFX7-GISEL-NEXT: v_and_b32_e32 v2, 0xffff, v21500; GFX7-GISEL-NEXT: v_or_b32_e32 v1, v1, v21501; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v2, 16, v51502; GFX7-GISEL-NEXT: v_and_b32_e32 v3, 0xffff, v41503; GFX7-GISEL-NEXT: v_or_b32_e32 v2, v2, v31504; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v3, 16, v71505; GFX7-GISEL-NEXT: v_and_b32_e32 v4, 0xffff, v61506; GFX7-GISEL-NEXT: v_or_b32_e32 v3, v3, v41507; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v4, 16, v91508; GFX7-GISEL-NEXT: v_and_b32_e32 v5, 0xffff, v81509; GFX7-GISEL-NEXT: v_or_b32_e32 v4, v4, v51510; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v5, 16, v111511; GFX7-GISEL-NEXT: v_and_b32_e32 v6, 0xffff, v101512; GFX7-GISEL-NEXT: v_or_b32_e32 v5, v5, v61513; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v6, 16, v131514; GFX7-GISEL-NEXT: v_and_b32_e32 v7, 0xffff, v121515; GFX7-GISEL-NEXT: v_or_b32_e32 v6, v6, v71516; GFX7-GISEL-NEXT: v_lshlrev_b32_e32 v7, 16, v151517; GFX7-GISEL-NEXT: v_and_b32_e32 v8, 0xffff, v141518; GFX7-GISEL-NEXT: v_or_b32_e32 v7, v7, v81519; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41520; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51521; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61522; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71523; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21524; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31525; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11526; GFX7-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01527; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11528; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1529;1530; GFX8-SDAG-LABEL: test_vector_reduce_xor_v16i16:1531; GFX8-SDAG: ; %bb.0: ; %entry1532; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1533; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61534; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41535; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71536; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51537; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31538; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21539; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11540; GFX8-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11541; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1542;1543; GFX8-GISEL-LABEL: test_vector_reduce_xor_v16i16:1544; GFX8-GISEL: ; %bb.0: ; %entry1545; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1546; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41547; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51548; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61549; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71550; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21551; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31552; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11553; GFX8-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11554; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1555;1556; GFX9-SDAG-LABEL: test_vector_reduce_xor_v16i16:1557; GFX9-SDAG: ; %bb.0: ; %entry1558; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1559; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61560; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41561; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71562; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51563; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31564; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21565; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11566; GFX9-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11567; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1568;1569; GFX9-GISEL-LABEL: test_vector_reduce_xor_v16i16:1570; GFX9-GISEL: ; %bb.0: ; %entry1571; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1572; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41573; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51574; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61575; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71576; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21577; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31578; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11579; GFX9-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11580; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1581;1582; GFX10-SDAG-LABEL: test_vector_reduce_xor_v16i16:1583; GFX10-SDAG: ; %bb.0: ; %entry1584; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1585; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71586; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61587; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41588; GFX10-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v31589; GFX10-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v11590; GFX10-SDAG-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11591; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1592;1593; GFX10-GISEL-LABEL: test_vector_reduce_xor_v16i16:1594; GFX10-GISEL: ; %bb.0: ; %entry1595; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1596; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41597; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51598; GFX10-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61599; GFX10-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71600; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21601; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31602; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11603; GFX10-GISEL-NEXT: v_xor_b32_sdwa v0, v0, v0 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:WORD_11604; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1605;1606; GFX11-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v16i16:1607; GFX11-SDAG-TRUE16: ; %bb.0: ; %entry1608; GFX11-SDAG-TRUE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1609; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v3, v3, v71610; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v2, v2, v61611; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v41612; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1613; GFX11-SDAG-TRUE16-NEXT: v_xor3_b32 v1, v1, v5, v31614; GFX11-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11615; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01616; GFX11-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1617; GFX11-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1618; GFX11-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11619; GFX11-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1620;1621; GFX11-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v16i16:1622; GFX11-SDAG-FAKE16: ; %bb.0: ; %entry1623; GFX11-SDAG-FAKE16-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1624; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v71625; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v61626; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v41627; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1628; GFX11-SDAG-FAKE16-NEXT: v_xor3_b32 v1, v1, v5, v31629; GFX11-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11630; GFX11-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1631; GFX11-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01632; GFX11-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11633; GFX11-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1634;1635; GFX11-GISEL-LABEL: test_vector_reduce_xor_v16i16:1636; GFX11-GISEL: ; %bb.0: ; %entry1637; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1638; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41639; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51640; GFX11-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61641; GFX11-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71642; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)1643; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21644; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31645; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1646; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11647; GFX11-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01648; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1649; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11650; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]1651;1652; GFX12-SDAG-TRUE16-LABEL: test_vector_reduce_xor_v16i16:1653; GFX12-SDAG-TRUE16: ; %bb.0: ; %entry1654; GFX12-SDAG-TRUE16-NEXT: s_wait_loadcnt_dscnt 0x01655; GFX12-SDAG-TRUE16-NEXT: s_wait_expcnt 0x01656; GFX12-SDAG-TRUE16-NEXT: s_wait_samplecnt 0x01657; GFX12-SDAG-TRUE16-NEXT: s_wait_bvhcnt 0x01658; GFX12-SDAG-TRUE16-NEXT: s_wait_kmcnt 0x01659; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v3, v3, v71660; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v2, v2, v61661; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v41662; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1663; GFX12-SDAG-TRUE16-NEXT: v_xor3_b32 v1, v1, v5, v31664; GFX12-SDAG-TRUE16-NEXT: v_xor3_b32 v0, v0, v2, v11665; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.h, 01666; GFX12-SDAG-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1667; GFX12-SDAG-TRUE16-NEXT: v_mov_b16_e32 v1.l, v0.h1668; GFX12-SDAG-TRUE16-NEXT: v_xor_b32_e32 v0, v0, v11669; GFX12-SDAG-TRUE16-NEXT: s_setpc_b64 s[30:31]1670;1671; GFX12-SDAG-FAKE16-LABEL: test_vector_reduce_xor_v16i16:1672; GFX12-SDAG-FAKE16: ; %bb.0: ; %entry1673; GFX12-SDAG-FAKE16-NEXT: s_wait_loadcnt_dscnt 0x01674; GFX12-SDAG-FAKE16-NEXT: s_wait_expcnt 0x01675; GFX12-SDAG-FAKE16-NEXT: s_wait_samplecnt 0x01676; GFX12-SDAG-FAKE16-NEXT: s_wait_bvhcnt 0x01677; GFX12-SDAG-FAKE16-NEXT: s_wait_kmcnt 0x01678; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v3, v3, v71679; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v2, v2, v61680; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v41681; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1682; GFX12-SDAG-FAKE16-NEXT: v_xor3_b32 v1, v1, v5, v31683; GFX12-SDAG-FAKE16-NEXT: v_xor3_b32 v0, v0, v2, v11684; GFX12-SDAG-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1685; GFX12-SDAG-FAKE16-NEXT: v_lshrrev_b32_e32 v1, 16, v01686; GFX12-SDAG-FAKE16-NEXT: v_xor_b32_e32 v0, v0, v11687; GFX12-SDAG-FAKE16-NEXT: s_setpc_b64 s[30:31]1688;1689; GFX12-GISEL-LABEL: test_vector_reduce_xor_v16i16:1690; GFX12-GISEL: ; %bb.0: ; %entry1691; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x01692; GFX12-GISEL-NEXT: s_wait_expcnt 0x01693; GFX12-GISEL-NEXT: s_wait_samplecnt 0x01694; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x01695; GFX12-GISEL-NEXT: s_wait_kmcnt 0x01696; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41697; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51698; GFX12-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61699; GFX12-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71700; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)1701; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21702; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31703; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)1704; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11705; GFX12-GISEL-NEXT: v_lshrrev_b32_e32 v1, 16, v01706; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)1707; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11708; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]1709entry:1710 %res = call i16 @llvm.vector.reduce.xor.v16i16(<16 x i16> %v)1711 ret i16 %res1712}1713 1714 1715define i32 @test_vector_reduce_xor_v2i32(<2 x i32> %v) {1716; GFX7-LABEL: test_vector_reduce_xor_v2i32:1717; GFX7: ; %bb.0: ; %entry1718; GFX7-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1719; GFX7-NEXT: v_xor_b32_e32 v0, v0, v11720; GFX7-NEXT: s_setpc_b64 s[30:31]1721;1722; GFX8-LABEL: test_vector_reduce_xor_v2i32:1723; GFX8: ; %bb.0: ; %entry1724; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1725; GFX8-NEXT: v_xor_b32_e32 v0, v0, v11726; GFX8-NEXT: s_setpc_b64 s[30:31]1727;1728; GFX9-LABEL: test_vector_reduce_xor_v2i32:1729; GFX9: ; %bb.0: ; %entry1730; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1731; GFX9-NEXT: v_xor_b32_e32 v0, v0, v11732; GFX9-NEXT: s_setpc_b64 s[30:31]1733;1734; GFX10-LABEL: test_vector_reduce_xor_v2i32:1735; GFX10: ; %bb.0: ; %entry1736; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1737; GFX10-NEXT: v_xor_b32_e32 v0, v0, v11738; GFX10-NEXT: s_setpc_b64 s[30:31]1739;1740; GFX11-LABEL: test_vector_reduce_xor_v2i32:1741; GFX11: ; %bb.0: ; %entry1742; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1743; GFX11-NEXT: v_xor_b32_e32 v0, v0, v11744; GFX11-NEXT: s_setpc_b64 s[30:31]1745;1746; GFX12-LABEL: test_vector_reduce_xor_v2i32:1747; GFX12: ; %bb.0: ; %entry1748; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01749; GFX12-NEXT: s_wait_expcnt 0x01750; GFX12-NEXT: s_wait_samplecnt 0x01751; GFX12-NEXT: s_wait_bvhcnt 0x01752; GFX12-NEXT: s_wait_kmcnt 0x01753; GFX12-NEXT: v_xor_b32_e32 v0, v0, v11754; GFX12-NEXT: s_setpc_b64 s[30:31]1755entry:1756 %res = call i32 @llvm.vector.reduce.xor.v2i32(<2 x i32> %v)1757 ret i32 %res1758}1759 1760define i32 @test_vector_reduce_xor_v3i32(<3 x i32> %v) {1761; GFX7-LABEL: test_vector_reduce_xor_v3i32:1762; GFX7: ; %bb.0: ; %entry1763; GFX7-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1764; GFX7-NEXT: v_xor_b32_e32 v0, v0, v11765; GFX7-NEXT: v_xor_b32_e32 v0, v0, v21766; GFX7-NEXT: s_setpc_b64 s[30:31]1767;1768; GFX8-LABEL: test_vector_reduce_xor_v3i32:1769; GFX8: ; %bb.0: ; %entry1770; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1771; GFX8-NEXT: v_xor_b32_e32 v0, v0, v11772; GFX8-NEXT: v_xor_b32_e32 v0, v0, v21773; GFX8-NEXT: s_setpc_b64 s[30:31]1774;1775; GFX9-LABEL: test_vector_reduce_xor_v3i32:1776; GFX9: ; %bb.0: ; %entry1777; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1778; GFX9-NEXT: v_xor_b32_e32 v0, v0, v11779; GFX9-NEXT: v_xor_b32_e32 v0, v0, v21780; GFX9-NEXT: s_setpc_b64 s[30:31]1781;1782; GFX10-LABEL: test_vector_reduce_xor_v3i32:1783; GFX10: ; %bb.0: ; %entry1784; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1785; GFX10-NEXT: v_xor3_b32 v0, v0, v1, v21786; GFX10-NEXT: s_setpc_b64 s[30:31]1787;1788; GFX11-LABEL: test_vector_reduce_xor_v3i32:1789; GFX11: ; %bb.0: ; %entry1790; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1791; GFX11-NEXT: v_xor3_b32 v0, v0, v1, v21792; GFX11-NEXT: s_setpc_b64 s[30:31]1793;1794; GFX12-LABEL: test_vector_reduce_xor_v3i32:1795; GFX12: ; %bb.0: ; %entry1796; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01797; GFX12-NEXT: s_wait_expcnt 0x01798; GFX12-NEXT: s_wait_samplecnt 0x01799; GFX12-NEXT: s_wait_bvhcnt 0x01800; GFX12-NEXT: s_wait_kmcnt 0x01801; GFX12-NEXT: v_xor3_b32 v0, v0, v1, v21802; GFX12-NEXT: s_setpc_b64 s[30:31]1803entry:1804 %res = call i32 @llvm.vector.reduce.xor.v3i32(<3 x i32> %v)1805 ret i32 %res1806}1807 1808define i32 @test_vector_reduce_xor_v4i32(<4 x i32> %v) {1809; GFX7-SDAG-LABEL: test_vector_reduce_xor_v4i32:1810; GFX7-SDAG: ; %bb.0: ; %entry1811; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1812; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31813; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21814; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11815; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1816;1817; GFX7-GISEL-LABEL: test_vector_reduce_xor_v4i32:1818; GFX7-GISEL: ; %bb.0: ; %entry1819; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1820; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21821; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31822; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11823; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1824;1825; GFX8-SDAG-LABEL: test_vector_reduce_xor_v4i32:1826; GFX8-SDAG: ; %bb.0: ; %entry1827; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1828; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31829; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21830; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11831; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1832;1833; GFX8-GISEL-LABEL: test_vector_reduce_xor_v4i32:1834; GFX8-GISEL: ; %bb.0: ; %entry1835; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1836; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21837; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31838; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11839; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1840;1841; GFX9-SDAG-LABEL: test_vector_reduce_xor_v4i32:1842; GFX9-SDAG: ; %bb.0: ; %entry1843; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1844; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31845; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21846; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11847; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1848;1849; GFX9-GISEL-LABEL: test_vector_reduce_xor_v4i32:1850; GFX9-GISEL: ; %bb.0: ; %entry1851; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1852; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21853; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31854; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11855; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1856;1857; GFX10-LABEL: test_vector_reduce_xor_v4i32:1858; GFX10: ; %bb.0: ; %entry1859; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1860; GFX10-NEXT: v_xor_b32_e32 v1, v1, v31861; GFX10-NEXT: v_xor3_b32 v0, v0, v2, v11862; GFX10-NEXT: s_setpc_b64 s[30:31]1863;1864; GFX11-LABEL: test_vector_reduce_xor_v4i32:1865; GFX11: ; %bb.0: ; %entry1866; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1867; GFX11-NEXT: v_xor_b32_e32 v1, v1, v31868; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)1869; GFX11-NEXT: v_xor3_b32 v0, v0, v2, v11870; GFX11-NEXT: s_setpc_b64 s[30:31]1871;1872; GFX12-LABEL: test_vector_reduce_xor_v4i32:1873; GFX12: ; %bb.0: ; %entry1874; GFX12-NEXT: s_wait_loadcnt_dscnt 0x01875; GFX12-NEXT: s_wait_expcnt 0x01876; GFX12-NEXT: s_wait_samplecnt 0x01877; GFX12-NEXT: s_wait_bvhcnt 0x01878; GFX12-NEXT: s_wait_kmcnt 0x01879; GFX12-NEXT: v_xor_b32_e32 v1, v1, v31880; GFX12-NEXT: s_delay_alu instid0(VALU_DEP_1)1881; GFX12-NEXT: v_xor3_b32 v0, v0, v2, v11882; GFX12-NEXT: s_setpc_b64 s[30:31]1883entry:1884 %res = call i32 @llvm.vector.reduce.xor.v4i32(<4 x i32> %v)1885 ret i32 %res1886}1887 1888define i32 @test_vector_reduce_xor_v8i32(<8 x i32> %v) {1889; GFX7-SDAG-LABEL: test_vector_reduce_xor_v8i32:1890; GFX7-SDAG: ; %bb.0: ; %entry1891; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1892; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61893; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41894; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71895; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51896; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31897; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21898; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11899; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]1900;1901; GFX7-GISEL-LABEL: test_vector_reduce_xor_v8i32:1902; GFX7-GISEL: ; %bb.0: ; %entry1903; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1904; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41905; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51906; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61907; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71908; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21909; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31910; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11911; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]1912;1913; GFX8-SDAG-LABEL: test_vector_reduce_xor_v8i32:1914; GFX8-SDAG: ; %bb.0: ; %entry1915; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1916; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61917; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41918; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71919; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51920; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31921; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21922; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11923; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]1924;1925; GFX8-GISEL-LABEL: test_vector_reduce_xor_v8i32:1926; GFX8-GISEL: ; %bb.0: ; %entry1927; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1928; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41929; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51930; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61931; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71932; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21933; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31934; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11935; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]1936;1937; GFX9-SDAG-LABEL: test_vector_reduce_xor_v8i32:1938; GFX9-SDAG: ; %bb.0: ; %entry1939; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1940; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61941; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41942; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71943; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v51944; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v31945; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v21946; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v11947; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]1948;1949; GFX9-GISEL-LABEL: test_vector_reduce_xor_v8i32:1950; GFX9-GISEL: ; %bb.0: ; %entry1951; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1952; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41953; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v51954; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61955; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71956; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v21957; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v31958; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v11959; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]1960;1961; GFX10-SDAG-LABEL: test_vector_reduce_xor_v8i32:1962; GFX10-SDAG: ; %bb.0: ; %entry1963; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1964; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71965; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61966; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41967; GFX10-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v31968; GFX10-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v11969; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]1970;1971; GFX10-GISEL-LABEL: test_vector_reduce_xor_v8i32:1972; GFX10-GISEL: ; %bb.0: ; %entry1973; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1974; GFX10-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71975; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41976; GFX10-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61977; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v31978; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v11979; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]1980;1981; GFX11-SDAG-LABEL: test_vector_reduce_xor_v8i32:1982; GFX11-SDAG: ; %bb.0: ; %entry1983; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1984; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v71985; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v61986; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v41987; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1988; GFX11-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v31989; GFX11-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v11990; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]1991;1992; GFX11-GISEL-LABEL: test_vector_reduce_xor_v8i32:1993; GFX11-GISEL: ; %bb.0: ; %entry1994; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1995; GFX11-GISEL-NEXT: v_xor_b32_e32 v3, v3, v71996; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v41997; GFX11-GISEL-NEXT: v_xor_b32_e32 v2, v2, v61998; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)1999; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32000; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v12001; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2002;2003; GFX12-SDAG-LABEL: test_vector_reduce_xor_v8i32:2004; GFX12-SDAG: ; %bb.0: ; %entry2005; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02006; GFX12-SDAG-NEXT: s_wait_expcnt 0x02007; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02008; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02009; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02010; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72011; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62012; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42013; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2014; GFX12-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v32015; GFX12-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v12016; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2017;2018; GFX12-GISEL-LABEL: test_vector_reduce_xor_v8i32:2019; GFX12-GISEL: ; %bb.0: ; %entry2020; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02021; GFX12-GISEL-NEXT: s_wait_expcnt 0x02022; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02023; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02024; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02025; GFX12-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72026; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42027; GFX12-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62028; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2029; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32030; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v12031; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2032entry:2033 %res = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> %v)2034 ret i32 %res2035}2036 2037define i32 @test_vector_reduce_xor_v16i32(<16 x i32> %v) {2038; GFX7-SDAG-LABEL: test_vector_reduce_xor_v16i32:2039; GFX7-SDAG: ; %bb.0: ; %entry2040; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2041; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132042; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92043; GFX7-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152044; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112045; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122046; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82047; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142048; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102049; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62050; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42051; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72052; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52053; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32054; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22055; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v12056; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2057;2058; GFX7-GISEL-LABEL: test_vector_reduce_xor_v16i32:2059; GFX7-GISEL: ; %bb.0: ; %entry2060; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2061; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82062; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92063; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102064; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112065; GFX7-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122066; GFX7-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132067; GFX7-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142068; GFX7-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152069; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42070; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52071; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62072; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72073; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22074; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32075; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v12076; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2077;2078; GFX8-SDAG-LABEL: test_vector_reduce_xor_v16i32:2079; GFX8-SDAG: ; %bb.0: ; %entry2080; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2081; GFX8-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132082; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92083; GFX8-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152084; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112085; GFX8-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122086; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82087; GFX8-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142088; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102089; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62090; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42091; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72092; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52093; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32094; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22095; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v12096; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2097;2098; GFX8-GISEL-LABEL: test_vector_reduce_xor_v16i32:2099; GFX8-GISEL: ; %bb.0: ; %entry2100; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2101; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82102; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92103; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102104; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112105; GFX8-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122106; GFX8-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132107; GFX8-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142108; GFX8-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152109; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42110; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52111; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62112; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72113; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22114; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32115; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v12116; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2117;2118; GFX9-SDAG-LABEL: test_vector_reduce_xor_v16i32:2119; GFX9-SDAG: ; %bb.0: ; %entry2120; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2121; GFX9-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132122; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92123; GFX9-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152124; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112125; GFX9-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122126; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82127; GFX9-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142128; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102129; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62130; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42131; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72132; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52133; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32134; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22135; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v12136; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2137;2138; GFX9-GISEL-LABEL: test_vector_reduce_xor_v16i32:2139; GFX9-GISEL: ; %bb.0: ; %entry2140; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2141; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82142; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92143; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102144; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112145; GFX9-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122146; GFX9-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132147; GFX9-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142148; GFX9-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152149; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42150; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52151; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62152; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72153; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22154; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32155; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v12156; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2157;2158; GFX10-SDAG-LABEL: test_vector_reduce_xor_v16i32:2159; GFX10-SDAG: ; %bb.0: ; %entry2160; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2161; GFX10-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152162; GFX10-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132163; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92164; GFX10-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142165; GFX10-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122166; GFX10-SDAG-NEXT: v_xor3_b32 v3, v3, v11, v72167; GFX10-SDAG-NEXT: v_xor3_b32 v2, v2, v10, v62168; GFX10-SDAG-NEXT: v_xor3_b32 v0, v0, v8, v42169; GFX10-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v32170; GFX10-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v12171; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2172;2173; GFX10-GISEL-LABEL: test_vector_reduce_xor_v16i32:2174; GFX10-GISEL: ; %bb.0: ; %entry2175; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2176; GFX10-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152177; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92178; GFX10-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122179; GFX10-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132180; GFX10-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142181; GFX10-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72182; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v42183; GFX10-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62184; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32185; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v12186; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2187;2188; GFX11-SDAG-LABEL: test_vector_reduce_xor_v16i32:2189; GFX11-SDAG: ; %bb.0: ; %entry2190; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2191; GFX11-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152192; GFX11-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132193; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92194; GFX11-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142195; GFX11-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122196; GFX11-SDAG-NEXT: v_xor3_b32 v3, v3, v11, v72197; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)2198; GFX11-SDAG-NEXT: v_xor3_b32 v2, v2, v10, v62199; GFX11-SDAG-NEXT: v_xor3_b32 v0, v0, v8, v42200; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2201; GFX11-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v32202; GFX11-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v12203; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2204;2205; GFX11-GISEL-LABEL: test_vector_reduce_xor_v16i32:2206; GFX11-GISEL: ; %bb.0: ; %entry2207; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2208; GFX11-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152209; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92210; GFX11-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122211; GFX11-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132212; GFX11-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142213; GFX11-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72214; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)2215; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v42216; GFX11-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62217; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2218; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32219; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v12220; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2221;2222; GFX12-SDAG-LABEL: test_vector_reduce_xor_v16i32:2223; GFX12-SDAG: ; %bb.0: ; %entry2224; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02225; GFX12-SDAG-NEXT: s_wait_expcnt 0x02226; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02227; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02228; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02229; GFX12-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152230; GFX12-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132231; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92232; GFX12-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142233; GFX12-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122234; GFX12-SDAG-NEXT: v_xor3_b32 v3, v3, v11, v72235; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)2236; GFX12-SDAG-NEXT: v_xor3_b32 v2, v2, v10, v62237; GFX12-SDAG-NEXT: v_xor3_b32 v0, v0, v8, v42238; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2239; GFX12-SDAG-NEXT: v_xor3_b32 v1, v1, v5, v32240; GFX12-SDAG-NEXT: v_xor3_b32 v0, v0, v2, v12241; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2242;2243; GFX12-GISEL-LABEL: test_vector_reduce_xor_v16i32:2244; GFX12-GISEL: ; %bb.0: ; %entry2245; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02246; GFX12-GISEL-NEXT: s_wait_expcnt 0x02247; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02248; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02249; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02250; GFX12-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152251; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92252; GFX12-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122253; GFX12-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132254; GFX12-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142255; GFX12-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72256; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)2257; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v8, v42258; GFX12-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62259; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)2260; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32261; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v12262; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2263entry:2264 %res = call i32 @llvm.vector.reduce.xor.v16i32(<16 x i32> %v)2265 ret i32 %res2266}2267 2268define i64 @test_vector_reduce_xor_v2i64(<2 x i64> %v) {2269; GFX7-SDAG-LABEL: test_vector_reduce_xor_v2i64:2270; GFX7-SDAG: ; %bb.0: ; %entry2271; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2272; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32273; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22274; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2275;2276; GFX7-GISEL-LABEL: test_vector_reduce_xor_v2i64:2277; GFX7-GISEL: ; %bb.0: ; %entry2278; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2279; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22280; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32281; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2282;2283; GFX8-SDAG-LABEL: test_vector_reduce_xor_v2i64:2284; GFX8-SDAG: ; %bb.0: ; %entry2285; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2286; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32287; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22288; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2289;2290; GFX8-GISEL-LABEL: test_vector_reduce_xor_v2i64:2291; GFX8-GISEL: ; %bb.0: ; %entry2292; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2293; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22294; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32295; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2296;2297; GFX9-SDAG-LABEL: test_vector_reduce_xor_v2i64:2298; GFX9-SDAG: ; %bb.0: ; %entry2299; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2300; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32301; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22302; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2303;2304; GFX9-GISEL-LABEL: test_vector_reduce_xor_v2i64:2305; GFX9-GISEL: ; %bb.0: ; %entry2306; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2307; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22308; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32309; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2310;2311; GFX10-LABEL: test_vector_reduce_xor_v2i64:2312; GFX10: ; %bb.0: ; %entry2313; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2314; GFX10-NEXT: v_xor_b32_e32 v0, v0, v22315; GFX10-NEXT: v_xor_b32_e32 v1, v1, v32316; GFX10-NEXT: s_setpc_b64 s[30:31]2317;2318; GFX11-LABEL: test_vector_reduce_xor_v2i64:2319; GFX11: ; %bb.0: ; %entry2320; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2321; GFX11-NEXT: v_xor_b32_e32 v0, v0, v22322; GFX11-NEXT: v_xor_b32_e32 v1, v1, v32323; GFX11-NEXT: s_setpc_b64 s[30:31]2324;2325; GFX12-LABEL: test_vector_reduce_xor_v2i64:2326; GFX12: ; %bb.0: ; %entry2327; GFX12-NEXT: s_wait_loadcnt_dscnt 0x02328; GFX12-NEXT: s_wait_expcnt 0x02329; GFX12-NEXT: s_wait_samplecnt 0x02330; GFX12-NEXT: s_wait_bvhcnt 0x02331; GFX12-NEXT: s_wait_kmcnt 0x02332; GFX12-NEXT: v_xor_b32_e32 v0, v0, v22333; GFX12-NEXT: v_xor_b32_e32 v1, v1, v32334; GFX12-NEXT: s_setpc_b64 s[30:31]2335entry:2336 %res = call i64 @llvm.vector.reduce.xor.v2i64(<2 x i64> %v)2337 ret i64 %res2338}2339 2340define i64 @test_vector_reduce_xor_v3i64(<3 x i64> %v) {2341; GFX7-SDAG-LABEL: test_vector_reduce_xor_v3i64:2342; GFX7-SDAG: ; %bb.0: ; %entry2343; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2344; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32345; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22346; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52347; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42348; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2349;2350; GFX7-GISEL-LABEL: test_vector_reduce_xor_v3i64:2351; GFX7-GISEL: ; %bb.0: ; %entry2352; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2353; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22354; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32355; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42356; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52357; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2358;2359; GFX8-SDAG-LABEL: test_vector_reduce_xor_v3i64:2360; GFX8-SDAG: ; %bb.0: ; %entry2361; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2362; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32363; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22364; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52365; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42366; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2367;2368; GFX8-GISEL-LABEL: test_vector_reduce_xor_v3i64:2369; GFX8-GISEL: ; %bb.0: ; %entry2370; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2371; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22372; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32373; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42374; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52375; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2376;2377; GFX9-SDAG-LABEL: test_vector_reduce_xor_v3i64:2378; GFX9-SDAG: ; %bb.0: ; %entry2379; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2380; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32381; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22382; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52383; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42384; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2385;2386; GFX9-GISEL-LABEL: test_vector_reduce_xor_v3i64:2387; GFX9-GISEL: ; %bb.0: ; %entry2388; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2389; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22390; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32391; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42392; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52393; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2394;2395; GFX10-SDAG-LABEL: test_vector_reduce_xor_v3i64:2396; GFX10-SDAG: ; %bb.0: ; %entry2397; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2398; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22399; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32400; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42401; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52402; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2403;2404; GFX10-GISEL-LABEL: test_vector_reduce_xor_v3i64:2405; GFX10-GISEL: ; %bb.0: ; %entry2406; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2407; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v42408; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v3, v52409; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2410;2411; GFX11-SDAG-LABEL: test_vector_reduce_xor_v3i64:2412; GFX11-SDAG: ; %bb.0: ; %entry2413; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2414; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22415; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32416; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2417; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42418; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52419; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2420;2421; GFX11-GISEL-LABEL: test_vector_reduce_xor_v3i64:2422; GFX11-GISEL: ; %bb.0: ; %entry2423; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2424; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v42425; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v3, v52426; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2427;2428; GFX12-SDAG-LABEL: test_vector_reduce_xor_v3i64:2429; GFX12-SDAG: ; %bb.0: ; %entry2430; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02431; GFX12-SDAG-NEXT: s_wait_expcnt 0x02432; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02433; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02434; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02435; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22436; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32437; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2438; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42439; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52440; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2441;2442; GFX12-GISEL-LABEL: test_vector_reduce_xor_v3i64:2443; GFX12-GISEL: ; %bb.0: ; %entry2444; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02445; GFX12-GISEL-NEXT: s_wait_expcnt 0x02446; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02447; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02448; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02449; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v2, v42450; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v3, v52451; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2452entry:2453 %res = call i64 @llvm.vector.reduce.xor.v3i64(<3 x i64> %v)2454 ret i64 %res2455}2456 2457define i64 @test_vector_reduce_xor_v4i64(<4 x i64> %v) {2458; GFX7-SDAG-LABEL: test_vector_reduce_xor_v4i64:2459; GFX7-SDAG: ; %bb.0: ; %entry2460; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2461; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52462; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42463; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72464; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62465; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32466; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22467; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2468;2469; GFX7-GISEL-LABEL: test_vector_reduce_xor_v4i64:2470; GFX7-GISEL: ; %bb.0: ; %entry2471; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2472; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42473; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52474; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62475; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72476; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22477; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32478; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2479;2480; GFX8-SDAG-LABEL: test_vector_reduce_xor_v4i64:2481; GFX8-SDAG: ; %bb.0: ; %entry2482; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2483; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52484; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42485; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72486; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62487; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32488; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22489; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2490;2491; GFX8-GISEL-LABEL: test_vector_reduce_xor_v4i64:2492; GFX8-GISEL: ; %bb.0: ; %entry2493; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2494; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42495; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52496; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62497; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72498; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22499; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32500; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2501;2502; GFX9-SDAG-LABEL: test_vector_reduce_xor_v4i64:2503; GFX9-SDAG: ; %bb.0: ; %entry2504; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2505; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52506; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42507; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72508; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62509; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32510; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22511; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2512;2513; GFX9-GISEL-LABEL: test_vector_reduce_xor_v4i64:2514; GFX9-GISEL: ; %bb.0: ; %entry2515; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2516; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42517; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52518; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62519; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72520; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22521; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32522; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2523;2524; GFX10-SDAG-LABEL: test_vector_reduce_xor_v4i64:2525; GFX10-SDAG: ; %bb.0: ; %entry2526; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2527; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52528; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42529; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62530; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72531; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22532; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32533; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2534;2535; GFX10-GISEL-LABEL: test_vector_reduce_xor_v4i64:2536; GFX10-GISEL: ; %bb.0: ; %entry2537; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2538; GFX10-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62539; GFX10-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72540; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22541; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32542; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2543;2544; GFX11-SDAG-LABEL: test_vector_reduce_xor_v4i64:2545; GFX11-SDAG: ; %bb.0: ; %entry2546; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2547; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52548; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42549; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62550; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72551; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2552; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22553; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32554; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2555;2556; GFX11-GISEL-LABEL: test_vector_reduce_xor_v4i64:2557; GFX11-GISEL: ; %bb.0: ; %entry2558; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2559; GFX11-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62560; GFX11-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72561; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2562; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22563; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32564; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2565;2566; GFX12-SDAG-LABEL: test_vector_reduce_xor_v4i64:2567; GFX12-SDAG: ; %bb.0: ; %entry2568; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02569; GFX12-SDAG-NEXT: s_wait_expcnt 0x02570; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02571; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02572; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02573; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52574; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42575; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62576; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72577; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2578; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22579; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32580; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2581;2582; GFX12-GISEL-LABEL: test_vector_reduce_xor_v4i64:2583; GFX12-GISEL: ; %bb.0: ; %entry2584; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02585; GFX12-GISEL-NEXT: s_wait_expcnt 0x02586; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02587; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02588; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02589; GFX12-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62590; GFX12-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72591; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2592; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22593; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32594; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2595entry:2596 %res = call i64 @llvm.vector.reduce.xor.v4i64(<4 x i64> %v)2597 ret i64 %res2598}2599 2600define i64 @test_vector_reduce_xor_v8i64(<8 x i64> %v) {2601; GFX7-SDAG-LABEL: test_vector_reduce_xor_v8i64:2602; GFX7-SDAG: ; %bb.0: ; %entry2603; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2604; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112605; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102606; GFX7-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152607; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142608; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92609; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82610; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132611; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122612; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52613; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42614; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72615; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62616; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32617; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22618; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2619;2620; GFX7-GISEL-LABEL: test_vector_reduce_xor_v8i64:2621; GFX7-GISEL: ; %bb.0: ; %entry2622; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2623; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82624; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92625; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102626; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112627; GFX7-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122628; GFX7-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132629; GFX7-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142630; GFX7-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152631; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42632; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52633; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62634; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72635; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22636; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32637; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2638;2639; GFX8-SDAG-LABEL: test_vector_reduce_xor_v8i64:2640; GFX8-SDAG: ; %bb.0: ; %entry2641; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2642; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112643; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102644; GFX8-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152645; GFX8-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142646; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92647; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82648; GFX8-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132649; GFX8-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122650; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52651; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42652; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72653; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62654; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32655; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22656; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2657;2658; GFX8-GISEL-LABEL: test_vector_reduce_xor_v8i64:2659; GFX8-GISEL: ; %bb.0: ; %entry2660; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2661; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82662; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92663; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102664; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112665; GFX8-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122666; GFX8-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132667; GFX8-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142668; GFX8-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152669; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42670; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52671; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62672; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72673; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22674; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32675; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2676;2677; GFX9-SDAG-LABEL: test_vector_reduce_xor_v8i64:2678; GFX9-SDAG: ; %bb.0: ; %entry2679; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2680; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112681; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102682; GFX9-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152683; GFX9-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142684; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92685; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82686; GFX9-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132687; GFX9-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122688; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52689; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42690; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72691; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62692; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32693; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22694; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]2695;2696; GFX9-GISEL-LABEL: test_vector_reduce_xor_v8i64:2697; GFX9-GISEL: ; %bb.0: ; %entry2698; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2699; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82700; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92701; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102702; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112703; GFX9-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122704; GFX9-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132705; GFX9-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142706; GFX9-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152707; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42708; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52709; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62710; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v72711; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22712; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v32713; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]2714;2715; GFX10-SDAG-LABEL: test_vector_reduce_xor_v8i64:2716; GFX10-SDAG: ; %bb.0: ; %entry2717; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2718; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112719; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102720; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92721; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82722; GFX10-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132723; GFX10-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122724; GFX10-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142725; GFX10-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152726; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52727; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42728; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62729; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72730; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22731; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32732; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]2733;2734; GFX10-GISEL-LABEL: test_vector_reduce_xor_v8i64:2735; GFX10-GISEL: ; %bb.0: ; %entry2736; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2737; GFX10-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142738; GFX10-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152739; GFX10-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82740; GFX10-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92741; GFX10-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122742; GFX10-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132743; GFX10-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62744; GFX10-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72745; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22746; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32747; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]2748;2749; GFX11-SDAG-LABEL: test_vector_reduce_xor_v8i64:2750; GFX11-SDAG: ; %bb.0: ; %entry2751; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2752; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112753; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102754; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92755; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82756; GFX11-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132757; GFX11-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122758; GFX11-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142759; GFX11-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152760; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)2761; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52762; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42763; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)2764; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62765; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72766; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2767; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22768; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32769; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]2770;2771; GFX11-GISEL-LABEL: test_vector_reduce_xor_v8i64:2772; GFX11-GISEL: ; %bb.0: ; %entry2773; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2774; GFX11-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142775; GFX11-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152776; GFX11-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82777; GFX11-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92778; GFX11-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122779; GFX11-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132780; GFX11-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62781; GFX11-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72782; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2783; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22784; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32785; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]2786;2787; GFX12-SDAG-LABEL: test_vector_reduce_xor_v8i64:2788; GFX12-SDAG: ; %bb.0: ; %entry2789; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x02790; GFX12-SDAG-NEXT: s_wait_expcnt 0x02791; GFX12-SDAG-NEXT: s_wait_samplecnt 0x02792; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x02793; GFX12-SDAG-NEXT: s_wait_kmcnt 0x02794; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112795; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102796; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92797; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82798; GFX12-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132799; GFX12-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122800; GFX12-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142801; GFX12-SDAG-NEXT: v_xor_b32_e32 v7, v7, v152802; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)2803; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52804; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42805; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)2806; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62807; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v72808; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2809; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22810; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v32811; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]2812;2813; GFX12-GISEL-LABEL: test_vector_reduce_xor_v8i64:2814; GFX12-GISEL: ; %bb.0: ; %entry2815; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x02816; GFX12-GISEL-NEXT: s_wait_expcnt 0x02817; GFX12-GISEL-NEXT: s_wait_samplecnt 0x02818; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x02819; GFX12-GISEL-NEXT: s_wait_kmcnt 0x02820; GFX12-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142821; GFX12-GISEL-NEXT: v_xor_b32_e32 v7, v7, v152822; GFX12-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82823; GFX12-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92824; GFX12-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122825; GFX12-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132826; GFX12-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v62827; GFX12-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v72828; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)2829; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v22830; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v32831; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]2832entry:2833 %res = call i64 @llvm.vector.reduce.xor.v8i64(<8 x i64> %v)2834 ret i64 %res2835}2836 2837define i64 @test_vector_reduce_xor_v16i64(<16 x i64> %v) {2838; GFX7-SDAG-LABEL: test_vector_reduce_xor_v16i64:2839; GFX7-SDAG: ; %bb.0: ; %entry2840; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2841; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v202842; GFX7-SDAG-NEXT: buffer_load_dword v20, off, s[0:3], s322843; GFX7-SDAG-NEXT: v_xor_b32_e32 v12, v12, v282844; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v162845; GFX7-SDAG-NEXT: v_xor_b32_e32 v8, v8, v242846; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v222847; GFX7-SDAG-NEXT: v_xor_b32_e32 v14, v14, v302848; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v182849; GFX7-SDAG-NEXT: v_xor_b32_e32 v10, v10, v262850; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102851; GFX7-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142852; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82853; GFX7-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122854; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42855; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62856; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v212857; GFX7-SDAG-NEXT: v_xor_b32_e32 v13, v13, v292858; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v172859; GFX7-SDAG-NEXT: v_xor_b32_e32 v9, v9, v252860; GFX7-SDAG-NEXT: v_xor_b32_e32 v7, v7, v232861; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v192862; GFX7-SDAG-NEXT: v_xor_b32_e32 v11, v11, v272863; GFX7-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22864; GFX7-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112865; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92866; GFX7-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132867; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52868; GFX7-SDAG-NEXT: s_waitcnt vmcnt(0)2869; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v15, v202870; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v7, v22871; GFX7-SDAG-NEXT: v_xor_b32_e32 v2, v3, v22872; GFX7-SDAG-NEXT: v_xor_b32_e32 v1, v1, v22873; GFX7-SDAG-NEXT: s_setpc_b64 s[30:31]2874;2875; GFX7-GISEL-LABEL: test_vector_reduce_xor_v16i64:2876; GFX7-GISEL: ; %bb.0: ; %entry2877; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2878; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v162879; GFX7-GISEL-NEXT: buffer_load_dword v16, off, s[0:3], s322880; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v182881; GFX7-GISEL-NEXT: v_xor_b32_e32 v4, v4, v202882; GFX7-GISEL-NEXT: v_xor_b32_e32 v6, v6, v222883; GFX7-GISEL-NEXT: v_xor_b32_e32 v8, v8, v242884; GFX7-GISEL-NEXT: v_xor_b32_e32 v10, v10, v262885; GFX7-GISEL-NEXT: v_xor_b32_e32 v12, v12, v282886; GFX7-GISEL-NEXT: v_xor_b32_e32 v14, v14, v302887; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82888; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102889; GFX7-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122890; GFX7-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142891; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42892; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62893; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v172894; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v192895; GFX7-GISEL-NEXT: v_xor_b32_e32 v5, v5, v212896; GFX7-GISEL-NEXT: v_xor_b32_e32 v7, v7, v232897; GFX7-GISEL-NEXT: v_xor_b32_e32 v9, v9, v252898; GFX7-GISEL-NEXT: v_xor_b32_e32 v11, v11, v272899; GFX7-GISEL-NEXT: v_xor_b32_e32 v13, v13, v292900; GFX7-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22901; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92902; GFX7-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112903; GFX7-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132904; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52905; GFX7-GISEL-NEXT: s_waitcnt vmcnt(0)2906; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v15, v162907; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v7, v22908; GFX7-GISEL-NEXT: v_xor_b32_e32 v2, v3, v22909; GFX7-GISEL-NEXT: v_xor_b32_e32 v1, v1, v22910; GFX7-GISEL-NEXT: s_setpc_b64 s[30:31]2911;2912; GFX8-SDAG-LABEL: test_vector_reduce_xor_v16i64:2913; GFX8-SDAG: ; %bb.0: ; %entry2914; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2915; GFX8-SDAG-NEXT: v_xor_b32_e32 v4, v4, v202916; GFX8-SDAG-NEXT: buffer_load_dword v20, off, s[0:3], s322917; GFX8-SDAG-NEXT: v_xor_b32_e32 v12, v12, v282918; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v162919; GFX8-SDAG-NEXT: v_xor_b32_e32 v8, v8, v242920; GFX8-SDAG-NEXT: v_xor_b32_e32 v6, v6, v222921; GFX8-SDAG-NEXT: v_xor_b32_e32 v14, v14, v302922; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v182923; GFX8-SDAG-NEXT: v_xor_b32_e32 v10, v10, v262924; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102925; GFX8-SDAG-NEXT: v_xor_b32_e32 v6, v6, v142926; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v82927; GFX8-SDAG-NEXT: v_xor_b32_e32 v4, v4, v122928; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v42929; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v2, v62930; GFX8-SDAG-NEXT: v_xor_b32_e32 v5, v5, v212931; GFX8-SDAG-NEXT: v_xor_b32_e32 v13, v13, v292932; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v172933; GFX8-SDAG-NEXT: v_xor_b32_e32 v9, v9, v252934; GFX8-SDAG-NEXT: v_xor_b32_e32 v7, v7, v232935; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v192936; GFX8-SDAG-NEXT: v_xor_b32_e32 v11, v11, v272937; GFX8-SDAG-NEXT: v_xor_b32_e32 v0, v0, v22938; GFX8-SDAG-NEXT: v_xor_b32_e32 v3, v3, v112939; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v92940; GFX8-SDAG-NEXT: v_xor_b32_e32 v5, v5, v132941; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v52942; GFX8-SDAG-NEXT: s_waitcnt vmcnt(0)2943; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v15, v202944; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v7, v22945; GFX8-SDAG-NEXT: v_xor_b32_e32 v2, v3, v22946; GFX8-SDAG-NEXT: v_xor_b32_e32 v1, v1, v22947; GFX8-SDAG-NEXT: s_setpc_b64 s[30:31]2948;2949; GFX8-GISEL-LABEL: test_vector_reduce_xor_v16i64:2950; GFX8-GISEL: ; %bb.0: ; %entry2951; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2952; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v162953; GFX8-GISEL-NEXT: buffer_load_dword v16, off, s[0:3], s322954; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v182955; GFX8-GISEL-NEXT: v_xor_b32_e32 v4, v4, v202956; GFX8-GISEL-NEXT: v_xor_b32_e32 v6, v6, v222957; GFX8-GISEL-NEXT: v_xor_b32_e32 v8, v8, v242958; GFX8-GISEL-NEXT: v_xor_b32_e32 v10, v10, v262959; GFX8-GISEL-NEXT: v_xor_b32_e32 v12, v12, v282960; GFX8-GISEL-NEXT: v_xor_b32_e32 v14, v14, v302961; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v82962; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v102963; GFX8-GISEL-NEXT: v_xor_b32_e32 v4, v4, v122964; GFX8-GISEL-NEXT: v_xor_b32_e32 v6, v6, v142965; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v42966; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v2, v62967; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v172968; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v192969; GFX8-GISEL-NEXT: v_xor_b32_e32 v5, v5, v212970; GFX8-GISEL-NEXT: v_xor_b32_e32 v7, v7, v232971; GFX8-GISEL-NEXT: v_xor_b32_e32 v9, v9, v252972; GFX8-GISEL-NEXT: v_xor_b32_e32 v11, v11, v272973; GFX8-GISEL-NEXT: v_xor_b32_e32 v13, v13, v292974; GFX8-GISEL-NEXT: v_xor_b32_e32 v0, v0, v22975; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v92976; GFX8-GISEL-NEXT: v_xor_b32_e32 v3, v3, v112977; GFX8-GISEL-NEXT: v_xor_b32_e32 v5, v5, v132978; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v52979; GFX8-GISEL-NEXT: s_waitcnt vmcnt(0)2980; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v15, v162981; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v7, v22982; GFX8-GISEL-NEXT: v_xor_b32_e32 v2, v3, v22983; GFX8-GISEL-NEXT: v_xor_b32_e32 v1, v1, v22984; GFX8-GISEL-NEXT: s_setpc_b64 s[30:31]2985;2986; GFX9-SDAG-LABEL: test_vector_reduce_xor_v16i64:2987; GFX9-SDAG: ; %bb.0: ; %entry2988; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)2989; GFX9-SDAG-NEXT: scratch_load_dword v31, off, s322990; GFX9-SDAG-NEXT: v_xor_b32_e32 v4, v4, v202991; GFX9-SDAG-NEXT: v_xor_b32_e32 v12, v12, v282992; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v162993; GFX9-SDAG-NEXT: v_xor_b32_e32 v8, v8, v242994; GFX9-SDAG-NEXT: v_xor_b32_e32 v6, v6, v222995; GFX9-SDAG-NEXT: v_xor_b32_e32 v14, v14, v302996; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v182997; GFX9-SDAG-NEXT: v_xor_b32_e32 v10, v10, v262998; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v102999; GFX9-SDAG-NEXT: v_xor_b32_e32 v6, v6, v143000; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v83001; GFX9-SDAG-NEXT: v_xor_b32_e32 v4, v4, v123002; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v43003; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v2, v63004; GFX9-SDAG-NEXT: v_xor_b32_e32 v5, v5, v213005; GFX9-SDAG-NEXT: v_xor_b32_e32 v13, v13, v293006; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v173007; GFX9-SDAG-NEXT: v_xor_b32_e32 v9, v9, v253008; GFX9-SDAG-NEXT: v_xor_b32_e32 v7, v7, v233009; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v193010; GFX9-SDAG-NEXT: v_xor_b32_e32 v11, v11, v273011; GFX9-SDAG-NEXT: v_xor_b32_e32 v0, v0, v23012; GFX9-SDAG-NEXT: v_xor_b32_e32 v3, v3, v113013; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v93014; GFX9-SDAG-NEXT: v_xor_b32_e32 v5, v5, v133015; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v53016; GFX9-SDAG-NEXT: s_waitcnt vmcnt(0)3017; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v15, v313018; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v7, v23019; GFX9-SDAG-NEXT: v_xor_b32_e32 v2, v3, v23020; GFX9-SDAG-NEXT: v_xor_b32_e32 v1, v1, v23021; GFX9-SDAG-NEXT: s_setpc_b64 s[30:31]3022;3023; GFX9-GISEL-LABEL: test_vector_reduce_xor_v16i64:3024; GFX9-GISEL: ; %bb.0: ; %entry3025; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3026; GFX9-GISEL-NEXT: scratch_load_dword v31, off, s323027; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v163028; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v183029; GFX9-GISEL-NEXT: v_xor_b32_e32 v4, v4, v203030; GFX9-GISEL-NEXT: v_xor_b32_e32 v6, v6, v223031; GFX9-GISEL-NEXT: v_xor_b32_e32 v8, v8, v243032; GFX9-GISEL-NEXT: v_xor_b32_e32 v10, v10, v263033; GFX9-GISEL-NEXT: v_xor_b32_e32 v12, v12, v283034; GFX9-GISEL-NEXT: v_xor_b32_e32 v14, v14, v303035; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v83036; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v103037; GFX9-GISEL-NEXT: v_xor_b32_e32 v4, v4, v123038; GFX9-GISEL-NEXT: v_xor_b32_e32 v6, v6, v143039; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v43040; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v2, v63041; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v173042; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v193043; GFX9-GISEL-NEXT: v_xor_b32_e32 v5, v5, v213044; GFX9-GISEL-NEXT: v_xor_b32_e32 v7, v7, v233045; GFX9-GISEL-NEXT: v_xor_b32_e32 v9, v9, v253046; GFX9-GISEL-NEXT: v_xor_b32_e32 v11, v11, v273047; GFX9-GISEL-NEXT: v_xor_b32_e32 v13, v13, v293048; GFX9-GISEL-NEXT: v_xor_b32_e32 v0, v0, v23049; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v93050; GFX9-GISEL-NEXT: v_xor_b32_e32 v3, v3, v113051; GFX9-GISEL-NEXT: v_xor_b32_e32 v5, v5, v133052; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v53053; GFX9-GISEL-NEXT: s_waitcnt vmcnt(0)3054; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v15, v313055; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v7, v23056; GFX9-GISEL-NEXT: v_xor_b32_e32 v2, v3, v23057; GFX9-GISEL-NEXT: v_xor_b32_e32 v1, v1, v23058; GFX9-GISEL-NEXT: s_setpc_b64 s[30:31]3059;3060; GFX10-SDAG-LABEL: test_vector_reduce_xor_v16i64:3061; GFX10-SDAG: ; %bb.0: ; %entry3062; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3063; GFX10-SDAG-NEXT: buffer_load_dword v31, off, s[0:3], s323064; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v183065; GFX10-SDAG-NEXT: v_xor_b32_e32 v10, v10, v263066; GFX10-SDAG-NEXT: v_xor_b32_e32 v5, v5, v213067; GFX10-SDAG-NEXT: v_xor_b32_e32 v4, v4, v203068; GFX10-SDAG-NEXT: v_xor_b32_e32 v13, v13, v293069; GFX10-SDAG-NEXT: v_xor_b32_e32 v12, v12, v283070; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v173071; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v163072; GFX10-SDAG-NEXT: v_xor_b32_e32 v9, v9, v253073; GFX10-SDAG-NEXT: v_xor_b32_e32 v8, v8, v243074; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v193075; GFX10-SDAG-NEXT: v_xor_b32_e32 v11, v11, v273076; GFX10-SDAG-NEXT: v_xor_b32_e32 v7, v7, v233077; GFX10-SDAG-NEXT: v_xor_b32_e32 v6, v6, v223078; GFX10-SDAG-NEXT: v_xor_b32_e32 v14, v14, v303079; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v103080; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v113081; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v93082; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v83083; GFX10-SDAG-NEXT: v_xor_b32_e32 v5, v5, v133084; GFX10-SDAG-NEXT: v_xor_b32_e32 v4, v4, v123085; GFX10-SDAG-NEXT: v_xor_b32_e32 v6, v6, v143086; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v53087; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v43088; GFX10-SDAG-NEXT: v_xor_b32_e32 v2, v2, v63089; GFX10-SDAG-NEXT: v_xor_b32_e32 v0, v0, v23090; GFX10-SDAG-NEXT: s_waitcnt vmcnt(0)3091; GFX10-SDAG-NEXT: v_xor_b32_e32 v10, v15, v313092; GFX10-SDAG-NEXT: v_xor_b32_e32 v7, v7, v103093; GFX10-SDAG-NEXT: v_xor_b32_e32 v3, v3, v73094; GFX10-SDAG-NEXT: v_xor_b32_e32 v1, v1, v33095; GFX10-SDAG-NEXT: s_setpc_b64 s[30:31]3096;3097; GFX10-GISEL-LABEL: test_vector_reduce_xor_v16i64:3098; GFX10-GISEL: ; %bb.0: ; %entry3099; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3100; GFX10-GISEL-NEXT: buffer_load_dword v31, off, s[0:3], s323101; GFX10-GISEL-NEXT: v_xor_b32_e32 v14, v14, v303102; GFX10-GISEL-NEXT: v_xor_b32_e32 v2, v2, v183103; GFX10-GISEL-NEXT: v_xor_b32_e32 v3, v3, v193104; GFX10-GISEL-NEXT: v_xor_b32_e32 v8, v8, v243105; GFX10-GISEL-NEXT: v_xor_b32_e32 v9, v9, v253106; GFX10-GISEL-NEXT: v_xor_b32_e32 v10, v10, v263107; GFX10-GISEL-NEXT: v_xor_b32_e32 v11, v11, v273108; GFX10-GISEL-NEXT: v_xor_b32_e32 v12, v12, v283109; GFX10-GISEL-NEXT: v_xor_b32_e32 v13, v13, v293110; GFX10-GISEL-NEXT: v_xor3_b32 v6, v6, v22, v143111; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v16, v83112; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v17, v93113; GFX10-GISEL-NEXT: v_xor3_b32 v4, v4, v20, v123114; GFX10-GISEL-NEXT: v_xor3_b32 v5, v5, v21, v133115; GFX10-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v63116; GFX10-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v23117; GFX10-GISEL-NEXT: s_waitcnt vmcnt(0)3118; GFX10-GISEL-NEXT: v_xor_b32_e32 v15, v15, v313119; GFX10-GISEL-NEXT: v_xor3_b32 v7, v7, v23, v153120; GFX10-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v73121; GFX10-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v33122; GFX10-GISEL-NEXT: s_setpc_b64 s[30:31]3123;3124; GFX11-SDAG-LABEL: test_vector_reduce_xor_v16i64:3125; GFX11-SDAG: ; %bb.0: ; %entry3126; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3127; GFX11-SDAG-NEXT: scratch_load_b32 v31, off, s323128; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v183129; GFX11-SDAG-NEXT: v_xor_b32_e32 v10, v10, v263130; GFX11-SDAG-NEXT: v_xor_b32_e32 v5, v5, v213131; GFX11-SDAG-NEXT: v_xor_b32_e32 v4, v4, v203132; GFX11-SDAG-NEXT: v_xor_b32_e32 v13, v13, v293133; GFX11-SDAG-NEXT: v_xor_b32_e32 v12, v12, v283134; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v173135; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v163136; GFX11-SDAG-NEXT: v_xor_b32_e32 v9, v9, v253137; GFX11-SDAG-NEXT: v_xor_b32_e32 v8, v8, v243138; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v193139; GFX11-SDAG-NEXT: v_xor_b32_e32 v11, v11, v273140; GFX11-SDAG-NEXT: v_xor_b32_e32 v7, v7, v233141; GFX11-SDAG-NEXT: v_xor_b32_e32 v6, v6, v223142; GFX11-SDAG-NEXT: v_xor_b32_e32 v14, v14, v303143; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v103144; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v113145; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v93146; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v83147; GFX11-SDAG-NEXT: v_xor_b32_e32 v5, v5, v133148; GFX11-SDAG-NEXT: v_xor_b32_e32 v4, v4, v123149; GFX11-SDAG-NEXT: v_xor_b32_e32 v6, v6, v143150; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)3151; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v53152; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v43153; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)3154; GFX11-SDAG-NEXT: v_xor_b32_e32 v2, v2, v63155; GFX11-SDAG-NEXT: v_xor_b32_e32 v0, v0, v23156; GFX11-SDAG-NEXT: s_waitcnt vmcnt(0)3157; GFX11-SDAG-NEXT: v_xor_b32_e32 v10, v15, v313158; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3159; GFX11-SDAG-NEXT: v_xor_b32_e32 v7, v7, v103160; GFX11-SDAG-NEXT: v_xor_b32_e32 v3, v3, v73161; GFX11-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)3162; GFX11-SDAG-NEXT: v_xor_b32_e32 v1, v1, v33163; GFX11-SDAG-NEXT: s_setpc_b64 s[30:31]3164;3165; GFX11-GISEL-LABEL: test_vector_reduce_xor_v16i64:3166; GFX11-GISEL: ; %bb.0: ; %entry3167; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)3168; GFX11-GISEL-NEXT: scratch_load_b32 v31, off, s323169; GFX11-GISEL-NEXT: v_xor_b32_e32 v14, v14, v303170; GFX11-GISEL-NEXT: v_xor_b32_e32 v2, v2, v183171; GFX11-GISEL-NEXT: v_xor_b32_e32 v3, v3, v193172; GFX11-GISEL-NEXT: v_xor_b32_e32 v8, v8, v243173; GFX11-GISEL-NEXT: v_xor_b32_e32 v9, v9, v253174; GFX11-GISEL-NEXT: v_xor_b32_e32 v10, v10, v263175; GFX11-GISEL-NEXT: v_xor_b32_e32 v11, v11, v273176; GFX11-GISEL-NEXT: v_xor_b32_e32 v12, v12, v283177; GFX11-GISEL-NEXT: v_xor_b32_e32 v13, v13, v293178; GFX11-GISEL-NEXT: v_xor3_b32 v6, v6, v22, v143179; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v16, v83180; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v17, v93181; GFX11-GISEL-NEXT: v_xor3_b32 v4, v4, v20, v123182; GFX11-GISEL-NEXT: v_xor3_b32 v5, v5, v21, v133183; GFX11-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v63184; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3185; GFX11-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v23186; GFX11-GISEL-NEXT: s_waitcnt vmcnt(0)3187; GFX11-GISEL-NEXT: v_xor_b32_e32 v15, v15, v313188; GFX11-GISEL-NEXT: v_xor3_b32 v7, v7, v23, v153189; GFX11-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3190; GFX11-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v73191; GFX11-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v33192; GFX11-GISEL-NEXT: s_setpc_b64 s[30:31]3193;3194; GFX12-SDAG-LABEL: test_vector_reduce_xor_v16i64:3195; GFX12-SDAG: ; %bb.0: ; %entry3196; GFX12-SDAG-NEXT: s_wait_loadcnt_dscnt 0x03197; GFX12-SDAG-NEXT: s_wait_expcnt 0x03198; GFX12-SDAG-NEXT: s_wait_samplecnt 0x03199; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x03200; GFX12-SDAG-NEXT: s_wait_kmcnt 0x03201; GFX12-SDAG-NEXT: scratch_load_b32 v31, off, s323202; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v183203; GFX12-SDAG-NEXT: v_xor_b32_e32 v10, v10, v263204; GFX12-SDAG-NEXT: v_xor_b32_e32 v5, v5, v213205; GFX12-SDAG-NEXT: v_xor_b32_e32 v4, v4, v203206; GFX12-SDAG-NEXT: v_xor_b32_e32 v13, v13, v293207; GFX12-SDAG-NEXT: v_xor_b32_e32 v12, v12, v283208; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v173209; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v163210; GFX12-SDAG-NEXT: v_xor_b32_e32 v9, v9, v253211; GFX12-SDAG-NEXT: v_xor_b32_e32 v8, v8, v243212; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v193213; GFX12-SDAG-NEXT: v_xor_b32_e32 v11, v11, v273214; GFX12-SDAG-NEXT: v_xor_b32_e32 v7, v7, v233215; GFX12-SDAG-NEXT: v_xor_b32_e32 v6, v6, v223216; GFX12-SDAG-NEXT: v_xor_b32_e32 v14, v14, v303217; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v103218; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v113219; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v93220; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v83221; GFX12-SDAG-NEXT: v_xor_b32_e32 v5, v5, v133222; GFX12-SDAG-NEXT: v_xor_b32_e32 v4, v4, v123223; GFX12-SDAG-NEXT: v_xor_b32_e32 v6, v6, v143224; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)3225; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v53226; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v43227; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)3228; GFX12-SDAG-NEXT: v_xor_b32_e32 v2, v2, v63229; GFX12-SDAG-NEXT: v_xor_b32_e32 v0, v0, v23230; GFX12-SDAG-NEXT: s_wait_loadcnt 0x03231; GFX12-SDAG-NEXT: v_xor_b32_e32 v10, v15, v313232; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3233; GFX12-SDAG-NEXT: v_xor_b32_e32 v7, v7, v103234; GFX12-SDAG-NEXT: v_xor_b32_e32 v3, v3, v73235; GFX12-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)3236; GFX12-SDAG-NEXT: v_xor_b32_e32 v1, v1, v33237; GFX12-SDAG-NEXT: s_setpc_b64 s[30:31]3238;3239; GFX12-GISEL-LABEL: test_vector_reduce_xor_v16i64:3240; GFX12-GISEL: ; %bb.0: ; %entry3241; GFX12-GISEL-NEXT: s_wait_loadcnt_dscnt 0x03242; GFX12-GISEL-NEXT: s_wait_expcnt 0x03243; GFX12-GISEL-NEXT: s_wait_samplecnt 0x03244; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x03245; GFX12-GISEL-NEXT: s_wait_kmcnt 0x03246; GFX12-GISEL-NEXT: scratch_load_b32 v31, off, s323247; GFX12-GISEL-NEXT: v_xor_b32_e32 v14, v14, v303248; GFX12-GISEL-NEXT: v_xor_b32_e32 v2, v2, v183249; GFX12-GISEL-NEXT: v_xor_b32_e32 v3, v3, v193250; GFX12-GISEL-NEXT: v_xor_b32_e32 v8, v8, v243251; GFX12-GISEL-NEXT: v_xor_b32_e32 v9, v9, v253252; GFX12-GISEL-NEXT: v_xor_b32_e32 v10, v10, v263253; GFX12-GISEL-NEXT: v_xor_b32_e32 v11, v11, v273254; GFX12-GISEL-NEXT: v_xor_b32_e32 v12, v12, v283255; GFX12-GISEL-NEXT: v_xor_b32_e32 v13, v13, v293256; GFX12-GISEL-NEXT: v_xor3_b32 v6, v6, v22, v143257; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v16, v83258; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v17, v93259; GFX12-GISEL-NEXT: v_xor3_b32 v4, v4, v20, v123260; GFX12-GISEL-NEXT: v_xor3_b32 v5, v5, v21, v133261; GFX12-GISEL-NEXT: v_xor3_b32 v2, v2, v10, v63262; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)3263; GFX12-GISEL-NEXT: v_xor3_b32 v0, v0, v4, v23264; GFX12-GISEL-NEXT: s_wait_loadcnt 0x03265; GFX12-GISEL-NEXT: v_xor_b32_e32 v15, v15, v313266; GFX12-GISEL-NEXT: v_xor3_b32 v7, v7, v23, v153267; GFX12-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)3268; GFX12-GISEL-NEXT: v_xor3_b32 v3, v3, v11, v73269; GFX12-GISEL-NEXT: v_xor3_b32 v1, v1, v5, v33270; GFX12-GISEL-NEXT: s_setpc_b64 s[30:31]3271entry:3272 %res = call i64 @llvm.vector.reduce.xor.v16i64(<16 x i64> %v)3273 ret i64 %res3274}3275 3276declare i8 @llvm.vector.reduce.xor.v2i8(<2 x i8>)3277declare i8 @llvm.vector.reduce.xor.v3i8(<3 x i8>)3278declare i8 @llvm.vector.reduce.xor.v4i8(<4 x i8>)3279declare i8 @llvm.vector.reduce.xor.v8i8(<8 x i8>)3280declare i8 @llvm.vector.reduce.xor.v16i8(<16 x i8>)3281 3282declare i16 @llvm.vector.reduce.xor.v2i16(<2 x i16>)3283declare i16 @llvm.vector.reduce.xor.v3i16(<3 x i16>)3284declare i16 @llvm.vector.reduce.xor.v4i16(<4 x i16>)3285declare i16 @llvm.vector.reduce.xor.v8i16(<8 x i16>)3286declare i16 @llvm.vector.reduce.xor.v16i16(<16 x i16>)3287 3288declare i32 @llvm.vector.reduce.xor.v2i32(<2 x i32>)3289declare i32 @llvm.vector.reduce.xor.v3i32(<3 x i32>)3290declare i32 @llvm.vector.reduce.xor.v4i32(<4 x i32>)3291declare i32 @llvm.vector.reduce.xor.v8i32(<8 x i32>)3292declare i32 @llvm.vector.reduce.xor.v16i32(<16 x i32>)3293 3294declare i64 @llvm.vector.reduce.xor.v2i64(<2 x i64>)3295declare i64 @llvm.vector.reduce.xor.v3i64(<3 x i64>)3296declare i64 @llvm.vector.reduce.xor.v4i64(<4 x i64>)3297declare i64 @llvm.vector.reduce.xor.v8i64(<8 x i64>)3298declare i64 @llvm.vector.reduce.xor.v16i64(<16 x i64>)3299;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:3300; GFX11-GISEL-FAKE16: {{.*}}3301; GFX12-GISEL-FAKE16: {{.*}}3302