Index: llvm/trunk/lib/Target/PowerPC/P9InstrResources.td =================================================================== --- llvm/trunk/lib/Target/PowerPC/P9InstrResources.td +++ llvm/trunk/lib/Target/PowerPC/P9InstrResources.td @@ -64,6 +64,7 @@ XXLAND, XXLANDC, XXLEQV, + XXLEQVOnes, XXLNAND, XXLNOR, XXLOR, Index: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp =================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -335,6 +335,7 @@ case PPC::XXLXORz: case PPC::XXLXORspz: case PPC::XXLXORdpz: + case PPC::XXLEQVOnes: case PPC::V_SET0B: case PPC::V_SET0H: case PPC::V_SET0: Index: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td @@ -386,7 +386,9 @@ // field. Used by instructions like 'ori'. return (uint64_t)N->getZExtValue() == (unsigned short)N->getZExtValue(); }], LO16>; -def immAnyExt8 : ImmLeaf(Imm) || isUInt<8>(Imm); }]>; +def immNonAllOneAnyExt8 : ImmLeaf(Imm) && (Imm != -1)) || (isUInt<8>(Imm) && (Imm != 0xFF)); +}]>; def immSExt5NonZero : ImmLeaf(Imm); }]>; // imm16Shifted* - These match immediates where the low 16-bits are zero. There Index: llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td =================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td +++ llvm/trunk/lib/Target/PowerPC/PPCInstrVSX.td @@ -1310,6 +1310,13 @@ def : Pat<(int_ppc_vsx_xxleqv v4i32:$A, v4i32:$B), (XXLEQV $A, $B)>; + let isCodeGenOnly = 1, isMoveImm = 1, isAsCheapAsAMove = 1, + isReMaterializable = 1 in { + def XXLEQVOnes : XX3Form_SameOp<60, 186, (outs vsrc:$XT), (ins), + "xxleqv $XT, $XT, $XT", IIC_VecGeneral, + [(set v4i32:$XT, (v4i32 immAllOnesV))]>; + } + def XXLORC : XX3Form<60, 170, (outs vsrc:$XT), (ins vsrc:$XA, vsrc:$XB), "xxlorc $XT, $XA, $XB", IIC_VecGeneral, @@ -4095,27 +4102,34 @@ (XXSPLTW (COPY_TO_REGCLASS (MTVSRWZ $A), VSRC), 1)>; } + let Predicates = [HasP8Vector] in { + def : Pat<(v4i32 (bitconvert (v16i8 immAllOnesV))), + (XXLEQVOnes)>; + def : Pat<(v1i128 (bitconvert (v16i8 immAllOnesV))), + (v1i128 (COPY_TO_REGCLASS(XXLEQVOnes), VSRC))>; + def : Pat<(v2i64 (bitconvert (v16i8 immAllOnesV))), + (v2i64 (COPY_TO_REGCLASS(XXLEQVOnes), VSRC))>; + def : Pat<(v8i16 (bitconvert (v16i8 immAllOnesV))), + (v8i16 (COPY_TO_REGCLASS(XXLEQVOnes), VSRC))>; + def : Pat<(v16i8 (bitconvert (v16i8 immAllOnesV))), + (v16i8 (COPY_TO_REGCLASS(XXLEQVOnes), VSRC))>; + } + let Predicates = [HasP9Vector] in { // Endianness-neutral patterns for const splats with ISA 3.0 instructions. def : Pat<(v4i32 (scalar_to_vector i32:$A)), (v4i32 (MTVSRWS $A))>; def : Pat<(v4i32 (build_vector i32:$A, i32:$A, i32:$A, i32:$A)), (v4i32 (MTVSRWS $A))>; - def : Pat<(v16i8 (build_vector immAnyExt8:$A, immAnyExt8:$A, immAnyExt8:$A, - immAnyExt8:$A, immAnyExt8:$A, immAnyExt8:$A, - immAnyExt8:$A, immAnyExt8:$A, immAnyExt8:$A, - immAnyExt8:$A, immAnyExt8:$A, immAnyExt8:$A, - immAnyExt8:$A, immAnyExt8:$A, immAnyExt8:$A, - immAnyExt8:$A)), + def : Pat<(v16i8 (build_vector immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A, + immNonAllOneAnyExt8:$A, immNonAllOneAnyExt8:$A)), (v16i8 (COPY_TO_REGCLASS (XXSPLTIB imm:$A), VSRC))>; - def : Pat<(v16i8 immAllOnesV), - (v16i8 (COPY_TO_REGCLASS (XXSPLTIB 255), VSRC))>; - def : Pat<(v8i16 immAllOnesV), - (v8i16 (COPY_TO_REGCLASS (XXSPLTIB 255), VSRC))>; - def : Pat<(v4i32 immAllOnesV), - (v4i32 (XXSPLTIB 255))>; - def : Pat<(v2i64 immAllOnesV), - (v2i64 (XXSPLTIB 255))>; def : Pat<(v4i32 (scalar_to_vector FltToIntLoad.A)), (v4i32 (XVCVSPSXWS (LXVWSX xoaddr:$A)))>; def : Pat<(v4i32 (scalar_to_vector FltToUIntLoad.A)), Index: llvm/trunk/test/CodeGen/PowerPC/build-vector-allones.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/build-vector-allones.ll +++ llvm/trunk/test/CodeGen/PowerPC/build-vector-allones.ll @@ -19,12 +19,12 @@ ; ; P8LE-LABEL: One1i128: ; P8LE: # %bb.0: # %entry -; P8LE-NEXT: vspltisb v2, -1 +; P8LE-NEXT: xxleqv vs34, vs34, vs34 ; P8LE-NEXT: blr ; ; P9LE-LABEL: One1i128: ; P9LE: # %bb.0: # %entry -; P9LE-NEXT: xxspltib vs34, 255 +; P9LE-NEXT: xxleqv vs34, vs34, vs34 ; P9LE-NEXT: blr entry: ret <1 x i128> @@ -40,12 +40,12 @@ ; ; P8LE-LABEL: One2i64: ; P8LE: # %bb.0: # %entry -; P8LE-NEXT: vspltisb v2, -1 +; P8LE-NEXT: xxleqv vs34, vs34, vs34 ; P8LE-NEXT: blr ; ; P9LE-LABEL: One2i64: ; P9LE: # %bb.0: # %entry -; P9LE-NEXT: xxspltib vs34, 255 +; P9LE-NEXT: xxleqv vs34, vs34, vs34 ; P9LE-NEXT: blr entry: ret <2 x i64> @@ -59,12 +59,12 @@ ; ; P8LE-LABEL: One4i32: ; P8LE: # %bb.0: # %entry -; P8LE-NEXT: vspltisb v2, -1 +; P8LE-NEXT: xxleqv vs34, vs34, vs34 ; P8LE-NEXT: blr ; ; P9LE-LABEL: One4i32: ; P9LE: # %bb.0: # %entry -; P9LE-NEXT: xxspltib vs34, 255 +; P9LE-NEXT: xxleqv vs34, vs34, vs34 ; P9LE-NEXT: blr entry: ret <4 x i32> @@ -78,12 +78,12 @@ ; ; P8LE-LABEL: One8i16: ; P8LE: # %bb.0: # %entry -; P8LE-NEXT: vspltisb v2, -1 +; P8LE-NEXT: xxleqv vs34, vs34, vs34 ; P8LE-NEXT: blr ; ; P9LE-LABEL: One8i16: ; P9LE: # %bb.0: # %entry -; P9LE-NEXT: xxspltib vs34, 255 +; P9LE-NEXT: xxleqv vs34, vs34, vs34 ; P9LE-NEXT: blr entry: ret <8 x i16> @@ -97,12 +97,12 @@ ; ; P8LE-LABEL: One16i8: ; P8LE: # %bb.0: # %entry -; P8LE-NEXT: vspltisb v2, -1 +; P8LE-NEXT: xxleqv vs34, vs34, vs34 ; P8LE-NEXT: blr ; ; P9LE-LABEL: One16i8: ; P9LE: # %bb.0: # %entry -; P9LE-NEXT: xxspltib vs34, 255 +; P9LE-NEXT: xxleqv vs34, vs34, vs34 ; P9LE-NEXT: blr entry: ret <16 x i8> Index: llvm/trunk/test/CodeGen/PowerPC/power9-moves-and-splats.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/power9-moves-and-splats.ll +++ llvm/trunk/test/CodeGen/PowerPC/power9-moves-and-splats.ll @@ -217,12 +217,12 @@ define <16 x i8> @test12() { ; CHECK-LABEL: test12: ; CHECK: # %bb.0: # %entry -; CHECK-NEXT: xxspltib v2, 255 +; CHECK-NEXT: xxleqv v2, v2, v2 ; CHECK-NEXT: blr ; ; CHECK-BE-LABEL: test12: ; CHECK-BE: # %bb.0: # %entry -; CHECK-BE-NEXT: xxspltib v2, 255 +; CHECK-BE-NEXT: xxleqv v2, v2, v2 ; CHECK-BE-NEXT: blr entry: Index: llvm/trunk/test/CodeGen/PowerPC/sat-add.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/sat-add.ll +++ llvm/trunk/test/CodeGen/PowerPC/sat-add.ll @@ -396,12 +396,12 @@ ; CHECK-LABEL: unsigned_sat_constant_v16i8_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI25_0@toc@ha -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI25_0@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: vaddubm 3, 2, 3 ; CHECK-NEXT: vcmpgtub 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <16 x i8> %x, %c = icmp ugt <16 x i8> %x, %a @@ -413,7 +413,7 @@ ; CHECK-LABEL: unsigned_sat_constant_v16i8_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI26_1@toc@ha -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI26_1@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: addis 3, 2, .LCPI26_0@toc@ha @@ -421,7 +421,7 @@ ; CHECK-NEXT: vcmpgtub 3, 2, 3 ; CHECK-NEXT: lvx 4, 0, 3 ; CHECK-NEXT: vaddubm 2, 2, 4 -; CHECK-NEXT: xxsel 34, 34, 37, 35 +; CHECK-NEXT: xxsel 34, 34, 0, 35 ; CHECK-NEXT: blr %a = add <16 x i8> %x, %c = icmp ugt <16 x i8> %x, @@ -451,12 +451,12 @@ ; CHECK-LABEL: unsigned_sat_constant_v8i16_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI28_0@toc@ha -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI28_0@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: vadduhm 3, 2, 3 ; CHECK-NEXT: vcmpgtuh 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <8 x i16> %x, %c = icmp ugt <8 x i16> %x, %a @@ -468,7 +468,7 @@ ; CHECK-LABEL: unsigned_sat_constant_v8i16_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI29_1@toc@ha -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI29_1@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: addis 3, 2, .LCPI29_0@toc@ha @@ -476,7 +476,7 @@ ; CHECK-NEXT: vcmpgtuh 3, 2, 3 ; CHECK-NEXT: lvx 4, 0, 3 ; CHECK-NEXT: vadduhm 2, 2, 4 -; CHECK-NEXT: xxsel 34, 34, 37, 35 +; CHECK-NEXT: xxsel 34, 34, 0, 35 ; CHECK-NEXT: blr %a = add <8 x i16> %x, %c = icmp ugt <8 x i16> %x, @@ -506,12 +506,12 @@ ; CHECK-LABEL: unsigned_sat_constant_v4i32_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI31_0@toc@ha -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI31_0@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: vadduwm 3, 2, 3 ; CHECK-NEXT: vcmpgtuw 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <4 x i32> %x, %c = icmp ugt <4 x i32> %x, %a @@ -523,7 +523,7 @@ ; CHECK-LABEL: unsigned_sat_constant_v4i32_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI32_1@toc@ha -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: addi 3, 3, .LCPI32_1@toc@l ; CHECK-NEXT: lvx 3, 0, 3 ; CHECK-NEXT: addis 3, 2, .LCPI32_0@toc@ha @@ -531,7 +531,7 @@ ; CHECK-NEXT: vcmpgtuw 3, 2, 3 ; CHECK-NEXT: lvx 4, 0, 3 ; CHECK-NEXT: vadduwm 2, 2, 4 -; CHECK-NEXT: xxsel 34, 34, 37, 35 +; CHECK-NEXT: xxsel 34, 34, 0, 35 ; CHECK-NEXT: blr %a = add <4 x i32> %x, %c = icmp ugt <4 x i32> %x, @@ -563,13 +563,13 @@ ; CHECK-LABEL: unsigned_sat_constant_v2i64_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI34_0@toc@ha -; CHECK-NEXT: vspltisb 4, -1 ; CHECK-NEXT: addi 3, 3, .LCPI34_0@toc@l ; CHECK-NEXT: lxvd2x 0, 0, 3 ; CHECK-NEXT: xxswapd 35, 0 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vaddudm 3, 2, 3 ; CHECK-NEXT: vcmpgtud 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <2 x i64> %x, %c = icmp ugt <2 x i64> %x, %a @@ -581,17 +581,17 @@ ; CHECK-LABEL: unsigned_sat_constant_v2i64_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: addis 3, 2, .LCPI35_1@toc@ha -; CHECK-NEXT: vspltisb 5, -1 ; CHECK-NEXT: addi 3, 3, .LCPI35_1@toc@l ; CHECK-NEXT: lxvd2x 0, 0, 3 ; CHECK-NEXT: addis 3, 2, .LCPI35_0@toc@ha ; CHECK-NEXT: addi 3, 3, .LCPI35_0@toc@l +; CHECK-NEXT: lxvd2x 1, 0, 3 ; CHECK-NEXT: xxswapd 35, 0 -; CHECK-NEXT: lxvd2x 0, 0, 3 +; CHECK-NEXT: xxleqv 0, 0, 0 +; CHECK-NEXT: xxswapd 36, 1 ; CHECK-NEXT: vcmpgtud 3, 2, 3 -; CHECK-NEXT: xxswapd 36, 0 ; CHECK-NEXT: vaddudm 2, 2, 4 -; CHECK-NEXT: xxsel 34, 34, 37, 35 +; CHECK-NEXT: xxsel 34, 34, 0, 35 ; CHECK-NEXT: blr %a = add <2 x i64> %x, %c = icmp ugt <2 x i64> %x, @@ -617,9 +617,9 @@ ; CHECK-LABEL: unsigned_sat_variable_v16i8_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: vaddubm 3, 2, 3 -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtub 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <16 x i8> %x, %y %c = icmp ugt <16 x i8> %x, %a @@ -631,10 +631,10 @@ ; CHECK-LABEL: unsigned_sat_variable_v16i8_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: xxlnor 36, 35, 35 -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtub 4, 2, 4 ; CHECK-NEXT: vaddubm 2, 2, 3 -; CHECK-NEXT: xxsel 34, 34, 37, 36 +; CHECK-NEXT: xxsel 34, 34, 0, 36 ; CHECK-NEXT: blr %noty = xor <16 x i8> %y, %a = add <16 x i8> %x, %y @@ -661,9 +661,9 @@ ; CHECK-LABEL: unsigned_sat_variable_v8i16_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: vadduhm 3, 2, 3 -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtuh 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <8 x i16> %x, %y %c = icmp ugt <8 x i16> %x, %a @@ -675,10 +675,10 @@ ; CHECK-LABEL: unsigned_sat_variable_v8i16_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: xxlnor 36, 35, 35 -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtuh 4, 2, 4 ; CHECK-NEXT: vadduhm 2, 2, 3 -; CHECK-NEXT: xxsel 34, 34, 37, 36 +; CHECK-NEXT: xxsel 34, 34, 0, 36 ; CHECK-NEXT: blr %noty = xor <8 x i16> %y, %a = add <8 x i16> %x, %y @@ -705,9 +705,9 @@ ; CHECK-LABEL: unsigned_sat_variable_v4i32_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: vadduwm 3, 2, 3 -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtuw 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <4 x i32> %x, %y %c = icmp ugt <4 x i32> %x, %a @@ -719,10 +719,10 @@ ; CHECK-LABEL: unsigned_sat_variable_v4i32_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: xxlnor 36, 35, 35 -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtuw 4, 2, 4 ; CHECK-NEXT: vadduwm 2, 2, 3 -; CHECK-NEXT: xxsel 34, 34, 37, 36 +; CHECK-NEXT: xxsel 34, 34, 0, 36 ; CHECK-NEXT: blr %noty = xor <4 x i32> %y, %a = add <4 x i32> %x, %y @@ -749,9 +749,9 @@ ; CHECK-LABEL: unsigned_sat_variable_v2i64_using_cmp_sum: ; CHECK: # %bb.0: ; CHECK-NEXT: vaddudm 3, 2, 3 -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtud 2, 2, 3 -; CHECK-NEXT: xxsel 34, 35, 36, 34 +; CHECK-NEXT: xxsel 34, 35, 0, 34 ; CHECK-NEXT: blr %a = add <2 x i64> %x, %y %c = icmp ugt <2 x i64> %x, %a @@ -763,10 +763,10 @@ ; CHECK-LABEL: unsigned_sat_variable_v2i64_using_cmp_notval: ; CHECK: # %bb.0: ; CHECK-NEXT: xxlnor 36, 35, 35 -; CHECK-NEXT: vspltisb 5, -1 +; CHECK-NEXT: xxleqv 0, 0, 0 ; CHECK-NEXT: vcmpgtud 4, 2, 4 ; CHECK-NEXT: vaddudm 2, 2, 3 -; CHECK-NEXT: xxsel 34, 34, 37, 36 +; CHECK-NEXT: xxsel 34, 34, 0, 36 ; CHECK-NEXT: blr %noty = xor <2 x i64> %y, %a = add <2 x i64> %x, %y Index: llvm/trunk/test/CodeGen/PowerPC/setcc-logic.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/setcc-logic.ll +++ llvm/trunk/test/CodeGen/PowerPC/setcc-logic.ll @@ -325,7 +325,7 @@ define <4 x i1> @all_sign_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) { ; CHECK-LABEL: all_sign_bits_clear_vec: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 36, 36, 36 ; CHECK-NEXT: xxlor 34, 34, 35 ; CHECK-NEXT: vcmpgtsw 2, 2, 4 ; CHECK-NEXT: blr @@ -338,7 +338,7 @@ define <4 x i1> @all_bits_set_vec(<4 x i32> %P, <4 x i32> %Q) { ; CHECK-LABEL: all_bits_set_vec: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 36, 36, 36 ; CHECK-NEXT: xxland 34, 34, 35 ; CHECK-NEXT: vcmpequw 2, 2, 4 ; CHECK-NEXT: blr @@ -391,7 +391,7 @@ define <4 x i1> @any_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) { ; CHECK-LABEL: any_bits_clear_vec: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 36, 36, 36 ; CHECK-NEXT: xxland 34, 34, 35 ; CHECK-NEXT: vcmpequw 2, 2, 4 ; CHECK-NEXT: xxlnor 34, 34, 34 @@ -405,7 +405,7 @@ define <4 x i1> @any_sign_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) { ; CHECK-LABEL: any_sign_bits_clear_vec: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 4, -1 +; CHECK-NEXT: xxleqv 36, 36, 36 ; CHECK-NEXT: xxland 34, 34, 35 ; CHECK-NEXT: vcmpgtsw 2, 2, 4 ; CHECK-NEXT: blr Index: llvm/trunk/test/CodeGen/PowerPC/signbit-shift.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/signbit-shift.ll +++ llvm/trunk/test/CodeGen/PowerPC/signbit-shift.ll @@ -29,7 +29,7 @@ define <4 x i32> @add_zext_ifpos_vec_splat(<4 x i32> %x) { ; CHECK-LABEL: add_zext_ifpos_vec_splat: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 3, -1 +; CHECK-NEXT: xxleqv 35, 35, 35 ; CHECK-NEXT: addis 3, 2, .LCPI2_0@toc@ha ; CHECK-NEXT: addi 3, 3, .LCPI2_0@toc@l ; CHECK-NEXT: vcmpgtsw 2, 2, 3 @@ -81,7 +81,7 @@ define <4 x i32> @add_sext_ifpos_vec_splat(<4 x i32> %x) { ; CHECK-LABEL: add_sext_ifpos_vec_splat: ; CHECK: # %bb.0: -; CHECK-NEXT: vspltisb 3, -1 +; CHECK-NEXT: xxleqv 35, 35, 35 ; CHECK-NEXT: addis 3, 2, .LCPI6_0@toc@ha ; CHECK-NEXT: addi 3, 3, .LCPI6_0@toc@l ; CHECK-NEXT: vcmpgtsw 2, 2, 3 Index: llvm/trunk/test/CodeGen/PowerPC/vec_add_sub_doubleword.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/vec_add_sub_doubleword.ll +++ llvm/trunk/test/CodeGen/PowerPC/vec_add_sub_doubleword.ll @@ -80,7 +80,7 @@ define <2 x i64> @decrement_by_one(<2 x i64> %x) nounwind { ; VSX-LABEL: decrement_by_one: ; VSX: # %bb.0: -; VSX-NEXT: vspltisb 3, -1 +; VSX-NEXT: xxleqv 35, 35, 35 ; VSX-NEXT: vsubudm 2, 2, 3 ; VSX-NEXT: blr ; Index: llvm/trunk/test/CodeGen/PowerPC/vselect-constants.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/vselect-constants.ll +++ llvm/trunk/test/CodeGen/PowerPC/vselect-constants.ll @@ -130,9 +130,9 @@ ; CHECK-LABEL: sel_0_or_minus1_vec: ; CHECK: # %bb.0: ; CHECK-NEXT: vspltisw 3, 1 -; CHECK-NEXT: vspltisb 4, -1 ; CHECK-NEXT: xxland 34, 34, 35 -; CHECK-NEXT: vadduwm 2, 2, 4 +; CHECK-NEXT: xxleqv 35, 35, 35 +; CHECK-NEXT: vadduwm 2, 2, 3 ; CHECK-NEXT: blr %add = select <4 x i1> %cond, <4 x i32> , <4 x i32> ret <4 x i32> %add