Qiu Chaofan 292d9e869f
[PowerPC] Mask constant operands in ValueBit tracking (#67653)
In IR or C code, shift amount larger than value size is undefined
behavior. But in practice, backend lowering for shift_parts produces
add/sub of shift amounts, thus constant shift amounts might be
negative or larger than value size, which depends on ISA definition.

PowerPC ISA says, the lowest 7 bits (6 bits for 32-bit instruction)
will be taken, and if the highest among them is 1, result will be
zero, otherwise the low 6 bits (or 5 on 32-bit) are used as shift
amount.

This commit emulates the behavior and avoids array overflow in bit
permutation's value bits calculator.
2024-02-06 18:37:31 +08:00
..
2022-10-11 17:24:06 +00:00
2023-09-01 19:45:03 -04:00
2023-02-14 10:25:24 -04:00
2022-10-11 17:24:06 +00:00
2023-06-28 14:50:16 -04:00
2022-10-11 17:24:06 +00:00
2023-09-28 15:51:14 +08:00
2022-10-11 17:24:06 +00:00
2022-11-04 10:18:04 -07:00