Index: llvm/trunk/lib/Target/ARM/ARMInstrMVE.td =================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrMVE.td +++ llvm/trunk/lib/Target/ARM/ARMInstrMVE.td @@ -4609,19 +4609,28 @@ (v8i1 (MVE_VCMPf16r (v8f16 MQPR:$v1), ZR, 1))>; } -def MVE_VPNOT : MVE_p<(outs), (ins), NoItinerary, +def MVE_VPNOT : MVE_p<(outs VCCR:$P0), (ins VCCR:$P0_in), NoItinerary, "vpnot", "", "", vpred_n, "", []> { let Inst{31-0} = 0b11111110001100010000111101001101; let Unpredictable{19-17} = 0b111; let Unpredictable{12} = 0b1; let Unpredictable{7} = 0b1; let Unpredictable{5} = 0b1; - let Defs = [P0]; - let Uses = [P0]; let Constraints = ""; + let DecoderMethod = "DecodeMVEVPNOT"; } +let Predicates = [HasMVEInt] in { + def : Pat<(v4i1 (xor (v4i1 VCCR:$pred), (v4i1 (predicate_cast (i32 65535))))), + (v4i1 (MVE_VPNOT (v4i1 VCCR:$pred)))>; + def : Pat<(v8i1 (xor (v8i1 VCCR:$pred), (v8i1 (predicate_cast (i32 65535))))), + (v8i1 (MVE_VPNOT (v8i1 VCCR:$pred)))>; + def : Pat<(v16i1 (xor (v16i1 VCCR:$pred), (v16i1 (predicate_cast (i32 65535))))), + (v16i1 (MVE_VPNOT (v16i1 VCCR:$pred)))>; +} + + class MVE_loltp_start size> : t2LOL<(outs GPRlr:$LR), iops, asm, ops> { bits<4> Rn; Index: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp =================================================================== --- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -561,6 +561,8 @@ uint64_t Address, const void *Decoder); static DecodeStatus DecodeMveVCTP(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); +static DecodeStatus DecodeMVEVPNOT(MCInst &Inst, unsigned Insn, + uint64_t Address, const void *Decoder); static DecodeStatus DecodeMVEOverlappingLongShift(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); @@ -6579,3 +6581,11 @@ return MCDisassembler::Fail; return S; } + +static DecodeStatus DecodeMVEVPNOT(MCInst &Inst, unsigned Insn, uint64_t Address, + const void *Decoder) { + DecodeStatus S = MCDisassembler::Success; + Inst.addOperand(MCOperand::createReg(ARM::VPR)); + Inst.addOperand(MCOperand::createReg(ARM::VPR)); + return S; +} Index: llvm/trunk/test/CodeGen/Thumb2/mve-pred-or.ll =================================================================== --- llvm/trunk/test/CodeGen/Thumb2/mve-pred-or.ll +++ llvm/trunk/test/CodeGen/Thumb2/mve-pred-or.ll @@ -5,12 +5,9 @@ ; CHECK-LABEL: cmpeqz_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i32 ne, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -25,12 +22,9 @@ ; CHECK-LABEL: cmpnez_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i32 eq, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -45,12 +39,9 @@ ; CHECK-LABEL: cmpsltz_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 ge, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -65,12 +56,9 @@ ; CHECK-LABEL: cmpsgtz_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 le, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -85,12 +73,9 @@ ; CHECK-LABEL: cmpslez_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 gt, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -105,12 +90,9 @@ ; CHECK-LABEL: cmpsgez_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 lt, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -139,12 +121,9 @@ ; CHECK-LABEL: cmpugtz_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i32 eq, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -192,12 +171,9 @@ ; CHECK-LABEL: cmpeq_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i32 ne, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -212,12 +188,9 @@ ; CHECK-LABEL: cmpne_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i32 eq, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -232,12 +205,9 @@ ; CHECK-LABEL: cmpslt_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 le, q2, q1 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -252,12 +222,9 @@ ; CHECK-LABEL: cmpsgt_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 le, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -272,12 +239,9 @@ ; CHECK-LABEL: cmpsle_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 lt, q2, q1 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -292,12 +256,9 @@ ; CHECK-LABEL: cmpsge_v4i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i32 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.s32 lt, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -391,12 +352,9 @@ ; CHECK-LABEL: cmpeqz_v8i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i16 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i16 ne, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -411,12 +369,9 @@ ; CHECK-LABEL: cmpeq_v8i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i16 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i16 ne, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -432,12 +387,9 @@ ; CHECK-LABEL: cmpeqz_v16i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i8 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i8 ne, q1, zr -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: @@ -452,12 +404,9 @@ ; CHECK-LABEL: cmpeq_v16i1: ; CHECK: @ %bb.0: @ %entry ; CHECK-NEXT: vcmp.i8 ne, q0, zr -; CHECK-NEXT: movw r1, #65535 ; CHECK-NEXT: vpst ; CHECK-NEXT: vcmpt.i8 ne, q1, q2 -; CHECK-NEXT: vmrs r0, p0 -; CHECK-NEXT: eors r0, r1 -; CHECK-NEXT: vmsr p0, r0 +; CHECK-NEXT: vpnot ; CHECK-NEXT: vpsel q0, q0, q1 ; CHECK-NEXT: bx lr entry: Index: llvm/trunk/test/CodeGen/Thumb2/mve-vcmpf.ll =================================================================== --- llvm/trunk/test/CodeGen/Thumb2/mve-vcmpf.ll +++ llvm/trunk/test/CodeGen/Thumb2/mve-vcmpf.ll @@ -116,12 +116,9 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, q1 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -526,10 +523,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -586,10 +580,7 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -646,10 +637,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, q1 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -706,10 +694,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, q1 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -766,12 +751,9 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, q1 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -1208,12 +1190,9 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 le, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, q1 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2492,10 +2471,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2676,10 +2652,7 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2860,10 +2833,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, q1 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -3044,10 +3014,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, q1 -; CHECK-MVEFP-NEXT: movw r1, #65535 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -3228,12 +3195,9 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 le, q1, q0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, q1 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: Index: llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfr.ll =================================================================== --- llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfr.ll +++ llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfr.ll @@ -119,14 +119,11 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -554,12 +551,9 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q1, q0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -618,12 +612,9 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q1, q0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -682,11 +673,8 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -745,11 +733,8 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -808,14 +793,11 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov r0, s4 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q1, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q2, q3 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -1233,15 +1215,12 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2451,13 +2430,10 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q3, q0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2626,13 +2602,10 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q3, q0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2801,12 +2774,9 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2975,12 +2945,9 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -3149,15 +3116,12 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vldr.16 s12, [r0] -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vmov r0, s12 ; CHECK-MVEFP-NEXT: vdup.16 q3, r0 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, r0 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: Index: llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfz.ll =================================================================== --- llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfz.ll +++ llvm/trunk/test/CodeGen/Thumb2/mve-vcmpfz.ll @@ -116,13 +116,10 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov.i32 q3, #0x0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 le, q0, q3 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -528,10 +525,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 le, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -588,10 +582,7 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 lt, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -648,10 +639,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 ge, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -708,10 +696,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f32 gt, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -768,13 +753,10 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v4f32: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov.i32 q3, #0x0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f32 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f32 lt, q0, q3 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -1180,13 +1162,10 @@ ; CHECK-MVEFP-LABEL: vcmp_one_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov.i32 q3, #0x0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 le, q0, q3 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2354,10 +2333,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ugt_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 le, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2522,10 +2498,7 @@ ; CHECK-MVEFP-LABEL: vcmp_uge_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 lt, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2690,10 +2663,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ult_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 ge, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -2858,10 +2828,7 @@ ; CHECK-MVEFP-LABEL: vcmp_ule_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vcmp.f16 gt, q0, zr -; CHECK-MVEFP-NEXT: movw r0, #65535 -; CHECK-MVEFP-NEXT: vmrs r1, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: @@ -3026,13 +2993,10 @@ ; CHECK-MVEFP-LABEL: vcmp_ord_v8f16: ; CHECK-MVEFP: @ %bb.0: @ %entry ; CHECK-MVEFP-NEXT: vmov.i32 q3, #0x0 -; CHECK-MVEFP-NEXT: movw r1, #65535 ; CHECK-MVEFP-NEXT: vcmp.f16 le, q3, q0 ; CHECK-MVEFP-NEXT: vpst ; CHECK-MVEFP-NEXT: vcmpt.f16 lt, q0, q3 -; CHECK-MVEFP-NEXT: vmrs r0, p0 -; CHECK-MVEFP-NEXT: eors r0, r1 -; CHECK-MVEFP-NEXT: vmsr p0, r0 +; CHECK-MVEFP-NEXT: vpnot ; CHECK-MVEFP-NEXT: vpsel q0, q1, q2 ; CHECK-MVEFP-NEXT: bx lr entry: