Index: lib/Target/PowerPC/PPCInstrAltivec.td =================================================================== --- lib/Target/PowerPC/PPCInstrAltivec.td +++ lib/Target/PowerPC/PPCInstrAltivec.td @@ -1213,3 +1213,26 @@ int_ppc_altivec_crypto_vncipherlast, v2i64>; def VSBOX : VXBX_Int_Ty<1480, "vsbox", int_ppc_altivec_crypto_vsbox, v2i64>; } // HasP8Crypto + +def HasP9Altivec : Predicate<"PPCSubTarget->hasP9Altivec()">; +let Predicates = [HasP9Altivec] in { + +// Vector Compare Not Equal (Zero) +// i8 element comparisons. +def VCMPNEB : VCMP < 7, "vcmpneb $vD, $vA, $vB" , v16i8>; +def VCMPNEBo : VCMPo< 7, "vcmpneb. $vD, $vA, $vB" , v16i8>; +def VCMPNEZB : VCMP <263, "vcmpnezb $vD, $vA, $vB" , v16i8>; +def VCMPNEZBo : VCMPo<263, "vcmpnezb. $vD, $vA, $vB", v16i8>; + +// i16 element comparisons. +def VCMPNEH : VCMP < 71, "vcmpneh $vD, $vA, $vB" , v8i16>; +def VCMPNEHo : VCMPo< 71, "vcmpneh. $vD, $vA, $vB" , v8i16>; +def VCMPNEZH : VCMP <327, "vcmpnezh $vD, $vA, $vB" , v8i16>; +def VCMPNEZHo : VCMPo<327, "vcmpnezh. $vD, $vA, $vB", v8i16>; + +// i32 element comparisons. +def VCMPNEW : VCMP <135, "vcmpnew $vD, $vA, $vB" , v4i32>; +def VCMPNEWo : VCMPo<135, "vcmpnew. $vD, $vA, $vB" , v4i32>; +def VCMPNEZW : VCMP <391, "vcmpnezw $vD, $vA, $vB" , v4i32>; +def VCMPNEZWo : VCMPo<391, "vcmpnezw. $vD, $vA, $vB", v4i32>; +} // end HasP9Altivec Index: lib/Target/PowerPC/PPCSubtarget.h =================================================================== --- lib/Target/PowerPC/PPCSubtarget.h +++ lib/Target/PowerPC/PPCSubtarget.h @@ -92,6 +92,7 @@ bool HasP8Vector; bool HasP8Altivec; bool HasP8Crypto; + bool HasP9Altivec; bool HasFCPSGN; bool HasFSQRT; bool HasFRE, HasFRES, HasFRSQRTE, HasFRSQRTES; @@ -229,6 +230,7 @@ bool hasP8Vector() const { return HasP8Vector; } bool hasP8Altivec() const { return HasP8Altivec; } bool hasP8Crypto() const { return HasP8Crypto; } + bool hasP9Altivec() const { return HasP9Altivec; } bool hasMFOCRF() const { return HasMFOCRF; } bool hasISEL() const { return HasISEL; } bool hasPOPCNTD() const { return HasPOPCNTD; } Index: lib/Target/PowerPC/PPCSubtarget.cpp =================================================================== --- lib/Target/PowerPC/PPCSubtarget.cpp +++ lib/Target/PowerPC/PPCSubtarget.cpp @@ -70,6 +70,7 @@ HasP8Vector = false; HasP8Altivec = false; HasP8Crypto = false; + HasP9Altivec = false; HasFCPSGN = false; HasFSQRT = false; HasFRE = false; Index: test/MC/Disassembler/PowerPC/ppc64-encoding-vmx.txt =================================================================== --- test/MC/Disassembler/PowerPC/ppc64-encoding-vmx.txt +++ test/MC/Disassembler/PowerPC/ppc64-encoding-vmx.txt @@ -489,6 +489,42 @@ # CHECK: vcmpgtud. 2, 3, 4 0x10 0x43 0x26 0xc7 +# CHECK: vcmpneb 2, 3, 4 +0x10 0x43 0x20 0x07 + +# CHECK: vcmpneb. 2, 3, 4 +0x10 0x43 0x24 0x07 + +# CHECK: vcmpnezb 2, 3, 4 +0x10 0x43 0x21 0x07 + +# CHECK: vcmpnezb. 2, 3, 4 +0x10 0x43 0x25 0x07 + +# CHECK: vcmpneh 2, 3, 4 +0x10 0x43 0x20 0x47 + +# CHECK: vcmpneh. 2, 3, 4 +0x10 0x43 0x24 0x47 + +# CHECK: vcmpnezh 2, 3, 4 +0x10 0x43 0x21 0x47 + +# CHECK: vcmpnezh. 2, 3, 4 +0x10 0x43 0x25 0x47 + +# CHECK: vcmpnew 2, 3, 4 +0x10 0x43 0x20 0x87 + +# CHECK: vcmpnew. 2, 3, 4 +0x10 0x43 0x24 0x87 + +# CHECK: vcmpnezw 2, 3, 4 +0x10 0x43 0x21 0x87 + +# CHECK: vcmpnezw. 2, 3, 4 +0x10 0x43 0x25 0x87 + # CHECK: vand 2, 3, 4 0x10 0x43 0x24 0x04 Index: test/MC/PowerPC/ppc64-encoding-vmx.s =================================================================== --- test/MC/PowerPC/ppc64-encoding-vmx.s +++ test/MC/PowerPC/ppc64-encoding-vmx.s @@ -530,6 +530,43 @@ # CHECK-LE: vcmpgtud. 2, 3, 4 # encoding: [0xc7,0x26,0x43,0x10] vcmpgtud. 2, 3, 4 +# CHECK-BE: vcmpneb 2, 3, 4 # encoding: [0x10,0x43,0x20,0x07] +# CHECK-LE: vcmpneb 2, 3, 4 # encoding: [0x07,0x20,0x43,0x10] + vcmpneb 2, 3, 4 +# CHECK-BE: vcmpneb. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x07] +# CHECK-LE: vcmpneb. 2, 3, 4 # encoding: [0x07,0x24,0x43,0x10] + vcmpneb. 2, 3, 4 +# CHECK-BE: vcmpnezb 2, 3, 4 # encoding: [0x10,0x43,0x21,0x07] +# CHECK-LE: vcmpnezb 2, 3, 4 # encoding: [0x07,0x21,0x43,0x10] + vcmpnezb 2, 3, 4 +# CHECK-BE: vcmpnezb. 2, 3, 4 # encoding: [0x10,0x43,0x25,0x07] +# CHECK-LE: vcmpnezb. 2, 3, 4 # encoding: [0x07,0x25,0x43,0x10] + vcmpnezb. 2, 3, 4 +# CHECK-BE: vcmpneh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x47] +# CHECK-LE: vcmpneh 2, 3, 4 # encoding: [0x47,0x20,0x43,0x10] + vcmpneh 2, 3, 4 +# CHECK-BE: vcmpneh. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x47] +# CHECK-LE: vcmpneh. 2, 3, 4 # encoding: [0x47,0x24,0x43,0x10] + vcmpneh. 2, 3, 4 +# CHECK-BE: vcmpnezh 2, 3, 4 # encoding: [0x10,0x43,0x21,0x47] +# CHECK-LE: vcmpnezh 2, 3, 4 # encoding: [0x47,0x21,0x43,0x10] + vcmpnezh 2, 3, 4 +# CHECK-BE: vcmpnezh. 2, 3, 4 # encoding: [0x10,0x43,0x25,0x47] +# CHECK-LE: vcmpnezh. 2, 3, 4 # encoding: [0x47,0x25,0x43,0x10] + vcmpnezh. 2, 3, 4 +# CHECK-BE: vcmpnew 2, 3, 4 # encoding: [0x10,0x43,0x20,0x87] +# CHECK-LE: vcmpnew 2, 3, 4 # encoding: [0x87,0x20,0x43,0x10] + vcmpnew 2, 3, 4 +# CHECK-BE: vcmpnew. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x87] +# CHECK-LE: vcmpnew. 2, 3, 4 # encoding: [0x87,0x24,0x43,0x10] + vcmpnew. 2, 3, 4 +# CHECK-BE: vcmpnezw 2, 3, 4 # encoding: [0x10,0x43,0x21,0x87] +# CHECK-LE: vcmpnezw 2, 3, 4 # encoding: [0x87,0x21,0x43,0x10] + vcmpnezw 2, 3, 4 +# CHECK-BE: vcmpnezw. 2, 3, 4 # encoding: [0x10,0x43,0x25,0x87] +# CHECK-LE: vcmpnezw. 2, 3, 4 # encoding: [0x87,0x25,0x43,0x10] + vcmpnezw. 2, 3, 4 + # Vector integer logical instructions # CHECK-BE: vand 2, 3, 4 # encoding: [0x10,0x43,0x24,0x04]