mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8282162: [vector] Optimize integral vector negation API
Reviewed-by: jiefu, psandoz, njian
This commit is contained in:
parent
bfd9c2b30f
commit
d06685680c
15 changed files with 301 additions and 51 deletions
|
@ -573,9 +573,6 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return broadcast(-1).lanewise(XOR, this);
|
||||
} else if (op == NEG) {
|
||||
// FIXME: Support this in the JIT.
|
||||
return broadcast(0).lanewise(SUB, this);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
@ -604,8 +601,6 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return lanewise(XOR, broadcast(-1), m);
|
||||
} else if (op == NEG) {
|
||||
return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
|
|
@ -573,9 +573,6 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return broadcast(-1).lanewise(XOR, this);
|
||||
} else if (op == NEG) {
|
||||
// FIXME: Support this in the JIT.
|
||||
return broadcast(0).lanewise(SUB, this);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
@ -604,8 +601,6 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return lanewise(XOR, broadcast(-1), m);
|
||||
} else if (op == NEG) {
|
||||
return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
|
|
@ -531,9 +531,6 @@ public abstract class LongVector extends AbstractVector<Long> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return broadcast(-1).lanewise(XOR, this);
|
||||
} else if (op == NEG) {
|
||||
// FIXME: Support this in the JIT.
|
||||
return broadcast(0).lanewise(SUB, this);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
@ -562,8 +559,6 @@ public abstract class LongVector extends AbstractVector<Long> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return lanewise(XOR, broadcast(-1), m);
|
||||
} else if (op == NEG) {
|
||||
return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
|
|
@ -573,9 +573,6 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return broadcast(-1).lanewise(XOR, this);
|
||||
} else if (op == NEG) {
|
||||
// FIXME: Support this in the JIT.
|
||||
return broadcast(0).lanewise(SUB, this);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
@ -604,8 +601,6 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
|||
}
|
||||
if (op == NOT) {
|
||||
return lanewise(XOR, broadcast(-1), m);
|
||||
} else if (op == NEG) {
|
||||
return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
|
||||
}
|
||||
}
|
||||
int opc = opCode(op);
|
||||
|
|
|
@ -596,9 +596,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
|||
#if[BITWISE]
|
||||
if (op == NOT) {
|
||||
return broadcast(-1).lanewise(XOR, this);
|
||||
} else if (op == NEG) {
|
||||
// FIXME: Support this in the JIT.
|
||||
return broadcast(0).lanewise(SUB, this);
|
||||
}
|
||||
#end[BITWISE]
|
||||
}
|
||||
|
@ -629,8 +626,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
|
|||
#if[BITWISE]
|
||||
if (op == NOT) {
|
||||
return lanewise(XOR, broadcast(-1), m);
|
||||
} else if (op == NEG) {
|
||||
return lanewise(NOT, m).lanewise(ADD, broadcast(1), m);
|
||||
}
|
||||
#end[BITWISE]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue