Commit 1cedeb39 authored by Ilija.Pavlovic's avatar Ilija.Pavlovic Committed by Commit bot

MIPS: Do not use ubfx for shr+and combination for mask=0

Port for https://codereview.chromium.org/2737493002

TEST=cctest/test-run-machops/Regression6046b
BUG=

Review-Url: https://codereview.chromium.org/2762993002
Cr-Commit-Position: refs/heads/master@{#44019}
parent 6f800b32
......@@ -498,7 +498,7 @@ void InstructionSelector::VisitWord32Shr(Node* node) {
if (m.left().IsWord32And() && m.right().HasValue()) {
uint32_t lsb = m.right().Value() & 0x1f;
Int32BinopMatcher mleft(m.left().node());
if (mleft.right().HasValue()) {
if (mleft.right().HasValue() && mleft.right().Value() != 0) {
// Select Ext for Shr(And(x, mask), imm) where the result of the mask is
// shifted into the least-significant bits.
uint32_t mask = (mleft.right().Value() >> lsb) << lsb;
......
Markdown is supported
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