Implement vnot using VNOR instead of using 'vspltisb v0, -1' and vxor
authorChris Lattner <sabre@nondot.org>
Sat, 1 Apr 2006 22:41:47 +0000 (22:41 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 1 Apr 2006 22:41:47 +0000 (22:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27331 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrAltivec.td

index e23666fe011ab9d7f5aa63b732fb79553319d536..cf3d663ca625ad6667aab608f6330781d2c9d931 100644 (file)
@@ -445,6 +445,10 @@ def : Pat<(v4i32 vecspltish:$invec), (v4i32 (VSPLTISH vecspltish:$invec))>;
 def : Pat<(v4i32 vecspltisw:$invec), (v4i32 (VSPLTISW vecspltisw:$invec))>;
 
 // Logical Operations
+def : Pat<(v16i8 (vnot VRRC:$vA)), (v16i8 (VNOR VRRC:$vA, VRRC:$vA))>;
+def : Pat<(v8i16 (vnot VRRC:$vA)), (v8i16 (VNOR VRRC:$vA, VRRC:$vA))>;
+def : Pat<(v4i32 (vnot VRRC:$vA)), (v4i32 (VNOR VRRC:$vA, VRRC:$vA))>;
+
 def : Pat<(v16i8 (and VRRC:$A, VRRC:$B)), (v16i8 (VAND VRRC:$A, VRRC:$B))>;
 def : Pat<(v8i16 (and VRRC:$A, VRRC:$B)), (v8i16 (VAND VRRC:$A, VRRC:$B))>;
 def : Pat<(v16i8 (or  VRRC:$A, VRRC:$B)), (v16i8 (VOR  VRRC:$A, VRRC:$B))>;