Page MenuHomePhabricator

[Mips] Fix missing masking in fast-isel of br (PR40325)
ClosedPublic

Authored by nikic on Feb 23 2019, 4:11 AM.

Details

Summary

Fixes https://bugs.llvm.org/show_bug.cgi?id=40325 by zero extending (= and x, 1) the condition before branching on it.

To avoid regressing trivial cases, I'm combining emission of cmp+br sequences for the single-use + same block case (similar to what we do in x86). icmpbr1.ll still regresses due to the cross-bb usage of the condition.

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.Feb 23 2019, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2019, 4:11 AM
atanasyan accepted this revision.Feb 25 2019, 12:24 AM

LGTM

Do you have commit access?

This revision is now accepted and ready to land.Feb 25 2019, 12:24 AM
This revision was automatically updated to reflect the committed changes.