Vector Absolute Value

vec_abs(arg1)

Each element of the result is the absolute value of the corresponding element of arg1. The arithmetic is modular for integer types.

Result

arg1

Maps To

vector signed char

vector signed char

vspltisb
vsububm
vmaxsb

vector signed short

vector signed short

vspltisb
vsubuhm
vmaxsh

vector signed long

vector signed long

vspltisb
vsubuwm
vmaxsw

vector float

vector float

vspltisw
vslw
vandc