Bitwise right shift operator >>

The >> (bitwise right shift operator) performs a logical or an algebraic right shift for each element of a vector. Each element of the result vector is the result of right shifting the corresponding element of the left operand by the number of bits specified by the value of the corresponding element of the right operand, modulo the number of bits in the element. When the right operand is an unsigned vector type, the bits that are shifted out are replaced by zeroes. While if the left operand is a signed vector type, the bits that are shifted out are replaced by copies of the most significant bit of the element of the left operand.

The following table lists the vector data types accepted as the operands, and the corresponding returned vector data types:
Table 1. Accepted vector data types for bitwise right shift operator >>
Result types Left operand types Right operand types
vector unsigned char vector unsigned char vector unsigned char
vector unsigned short vector unsigned short vector unsigned short
vector unsigned int vector unsigned int vector unsigned int
vector unsigned long long vector unsigned long long vector unsigned long long
vector unsigned char vector unsigned char unsigned long
vector unsigned short vector unsigned short unsigned long
vector unsigned int vector unsigned int unsigned long
vector unsigned long long vector unsigned long long unsigned long
vector signed char vector signed char vector signed char
vector unsigned char
vector signed short vector signed short vector signed short
vector unsigned short
vector signed int vector signed int vector signed int
vector unsigned int
vector signed long long vector signed long long vector signed long long
vector unsigned long long
vector signed char vector signed char unsigned long
vector signed short vector signed short unsigned long
vector signed int vector signed int unsigned long
vector signed long long vector signed long long unsigned long