Bitwise left shift operator <<

The << (bitwise left shift operator) performs a left shift for each element of a vector. Each element of the result vector is the result of left shifting the corresponding element of the left operand by the number of bits specified by the value specified on the right operand, or the value of the corresponding element of the right operand, modulo the number of bits in the element. The bits that are shifted out are replaced by zeros.

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 left shift operator <<
Result types Left operand types Right operand types
vector unsigned char vector unsigned char vector unsigned char
vector signed char vector signed char
vector unsigned short vector unsigned short vector unsigned short
vector signed short vector signed short
vector unsigned int vector unsigned int vector unsigned int
vector signed int vector signed int
vector unsigned long long vector unsigned long long vector unsigned long long
vector signed long long vector signed long long
vector unsigned char vector unsigned char unsigned long
vector signed char vector signed char
vector unsigned short vector unsigned short unsigned long
vector signed short vector signed short
vector unsigned int vector unsigned int unsigned long
vector signed int vector signed int
vector unsigned long long vector unsigned long long unsigned long
vector signed long long vector signed long long