POWER9 intrinsic procedures

A number of intrinsic procedures are available to exploit the POWER9 architecture.

Note: The following intrinsic procedures are valid only when -qarch is set to utilize the POWER9 technology.

Vector intrinsic procedures (IBM extension)

VEC_ABSD(ARG1, ARG2)
Returns a vector that contains the absolute difference of the corresponding elements of the given vectors.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CMPNE(ARG1, ARG2)
Returns a vector containing the results of comparing each set of the corresponding elements of the given vectors for inequality.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CMPNEZ(ARG1, ARG2)
Returns a vector that contains the results of comparing each set of the corresponding elements of the given vectors for inequality, or the results of testing the corresponding element of given vectors for the value of zero.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CNTLZ(ARG1)
Counts the most significant zero bits of each element of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CNTLZ_LSBB(ARG1)
Counts the leading byte elements of the given vector that have a least significant bit of 0.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CNTTZ(ARG1)
Counts the least significant zero bits of each element of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CNTTZ_LSBB(ARG1)
Counts the trailing byte elements of the given vector that have a least significant bit of 0.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_CONCAT(ARG1, ARG2)
Concatenates two elements to form a vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_EXTRACT_EXP(ARG1)
Returns a vector that contains the exponent of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_EXTRACT_SIG(ARG1)
Returns a vector that contains the significand of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_FIRST_MATCH_INDEX(ARG1, ARG2)
Compares each set of the corresponding elements of the given vectors and returns the first position of equality.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_FIRST_MATCH_OR_EOS_INDEX(ARG1, ARG2)
Compares each set of the corresponding elements of the given vectors and returns the first position of equality or the position of the end-of-string terminator

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_FIRST_MISMATCH_INDEX(ARG1, ARG2)
Compares each set of the corresponding elements of the given vectors and returns the first position of inequality.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_FIRST_MISMATCH_OR_EOS_INDEX(ARG1, ARG2)
Compares each set of the corresponding elements of the given vectors and returns the first position of inequality or the position of the end-of-string terminator

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_INSERT_EXP(ARG1, ARG2)
Returns a vector that combines the exponents of elements from one vector with the signs and the significands of elements from another vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_LOAD_SPLATS(ARG1, ARG2)
Loads a 4-byte element from the memory address specified by the displacement

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_PARITY_LSBB(ARG1)
Returns a vector that computes parity on the least significant bit of each byte of each element of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_RLMI(ARG1, ARG2, ARG3)
Returns a vector that contains each element of the given vector rotated left and inserted under a mask into another vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_RLNM(ARG1, ARG2, ARG3)
Returns a vector that contains each element of the given vector rotated left and intersected with a mask.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_SLV (ARG1, ARG2)
Left shifts the elements of a given vector by a given number of bits.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_SRV (ARG1, ARG2)
Right-shifts the elements of a given vector by a given number of bits.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_TEST_DATA_CLASS(ARG1, ARG2)
Determines the data class of the elements of the given vector.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_XL_LEN(ARG1, ARG2)
Returns a vector that loads a given number of bytes from the given address.

This intrinsic procedure is valid only when you include the altivec.h file.

VEC_XST_LEN(ARG1, ARG2, ARG3)
Stores a given byte length of a vector to a given address.

This intrinsic procedure is valid only when you include the altivec.h file.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us