Page MenuHomePhabricator

[X86] WIP Improve optimizeCompareInstr for signed comparisons after logical operations.
Needs ReviewPublic

Authored by craig.topper on Jan 15 2021, 7:47 PM.

Details

Summary

We previously couldn't optimize out a TEST if the branch/setcc/cmov
used the overflow flag. This patches allows the TEST to be removed
if the flag producing instruction is known to clear the OF flag.
Thats what the TEST instruction would have done so that should be
equivalent.

Need to add test cases. I'll try to get back to this if I have bandwidth.

Fixes PR48768.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 15 2021, 7:47 PM
craig.topper requested review of this revision.Jan 15 2021, 7:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 7:47 PM