What does an overlong bitshift on a LLVM vector yield?

82 views Asked by At

The LLVM documentation for 'shl' says that

<result> = shl i32 1, 32

is an undefined value because it's shifting by greater than or equal to the number of bits in an i32. However, it's not clear to me what happens with

<result> = shl <2 x i32> < i32 1, i32 1>, < i32 1, i32 32>

Is only the second element of the result undefined (result=<2 x i32> < i32 2, i32 undef>), or is the result as a whole undefined (result=<2 x i32> undef)?

0

There are 0 answers