Unverified Commit ca827d53 authored by Simon Pilgrim's avatar Simon Pilgrim Committed by GitHub
Browse files

[X86] Convert logicalshift(x, C) -> and(x, M) iff x is allsignbits (#83596)

If we're logical shifting an all-signbits value, then we can just mask out the shifted bits.

This helps removes some unnecessary bitcasted vXi16 shifts used for vXi8 shifts (which SimplifyDemandedBits will struggle to remove through the bitcast), and allows some AVX1 shifts of 256-bit values to stay as a YMM instruction.

Noticed in codegen from #82290
parent 10f5e983
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment