Skip to content
Commit fd4d584d authored by Craig Topper's avatar Craig Topper
Browse files

[RISCV] Add DAGCombine to fold (bitreverse (bswap X)) to brev8 with Zbkb.

If the type is less than XLenVT, type legalization will turn this
into (srl (bitreverse (bswap (srl (bswap X), C))), C). We can't
completely recover from these shifts. They introduce zeros into
the upper bits of the result and we can't easily tell if they are
needed. By doing a DAG combine early, we avoid introducing these
shifts.
parent b55a77d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment