Unverified Commit e13e95bc authored by yingopq's avatar yingopq Committed by GitHub
Browse files

[Mips] Optimize (shift x (and y, BitWidth - 1)) to (shift x, y) (#73889)

Do optimization to turn x >> (shift & 31/63) into a single srlv instead
of andi + srlv, since the mips variable shift instruction already
implicitly masks the shift, like x86, wasm and AMDGPU. Copy the
X86DAGToDAGISel::isUnneededShiftMask() function to MIPS for checking
whether need combine two instructions to one.
parent 87779fd8
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