fix simd_neg implementation for ints
gcc_not would panic upon encountering a vector type, which is not what we want here. Signed-off-by: Andy Sadler <andrewsadler122@gmail.com>
This commit is contained in:
parent
03e11a214e
commit
3a221320eb
@ -48,7 +48,7 @@ pub fn gcc_not(&self, a: RValue<'gcc>) -> RValue<'gcc> {
|
||||
|
||||
pub fn gcc_neg(&self, a: RValue<'gcc>) -> RValue<'gcc> {
|
||||
let a_type = a.get_type();
|
||||
if self.is_native_int_type(a_type) {
|
||||
if self.is_native_int_type(a_type) || a_type.is_vector() {
|
||||
self.cx.context.new_unary_op(None, UnaryOp::Minus, a.get_type(), a)
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user