vec_cfuge

Purpose

Separates the bits of each element in an input vector to the right and left within a target vector element, according to the mask in the corresponding element of the second input vector.

Note: This built-in function is valid only when the -mcpu option is set to target Power10 processors.

Syntax

d=vec_cfuge(a,b)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Types of the returned value and function arguments
d a b
vector unsigned long long vector unsigned long long vector unsigned long long

Result value

For each element of a, the bits whose corresponding bits in the mask in the corresponding element of b equal 1 are placed in the rightmost bits in the corresponding element of d, maintaining their original relative order. The other bits of the element of a are placed in the leftmost bits in the corresponding element of d, maintaining their original relative order.

Here is an example for doubleword inputs:
Argument Element 0 Element 1
a 0x 0123 4567 89ab cdef 0x 0123 4567 89ab cdef
b 0x 0f0f 0f0f 0f0f 0f0f 0x ffff 0000 ffff 0000
d 0x 0246 8ace 1357 9bdf 0x 4567 cdef 0123 89ab