Currently, we'd produce an incorrect decomposition, because we already recursively called GetLinearExpression(), so the Scale=1, Offset=0 will not necessarily be relative to the shl itself. Now, this doesn't actually matter for functional correctness, because such a shift is poison anyway, so its okay to return an incorrect decomposition. It's still unnecessarily confusing though, and we can easily avoid this by checking the bitwidth earlier.
73 KiB
73 KiB