Skip to content

ac/nir: mask shift operands

Rhys Perry requested to merge pendingchaos/mesa:ac_nir_large_shift_operand into main

Unlike NIR, large shift values returns a poison value.

This caused LLVM to incorrectly optimize (a >> c) | (b << (32 - c)) to a funnel shift right (v_alignbit_b32), when the original NIR should have returned a | b if c==0.

Edited by Rhys Perry

Merge request reports