This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Fix bug in expensive checks verification
ClosedPublic

Authored by craig.topper on May 19 2022, 4:57 PM.

Details

Summary

With fix forexpensive checks build failure exposed by new RISC-V tests.
Something about expanding two rotates in type legalization caused a change
in the remapping tables that the expensive checks verifying wasn't expecting.
See comment in the code for how it was fixed.

Tests came from this commit that exposed the bug
[RISCV] Add test cases showing failure to remove mask on rotate amounts.

If the masking AND has multiple users we fail to remove it.

Diff Detail

Event Timeline

craig.topper created this revision.May 19 2022, 4:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 4:57 PM
craig.topper requested review of this revision.May 19 2022, 4:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 4:57 PM
frasercrmck added inline comments.May 19 2022, 11:14 PM
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
148

it's -> its

craig.topper retitled this revision from Recommit "[RISCV] Add test cases showing failure to remove mask on rotate amounts." to [LegalizeTypes] Fix bug in expensive checks verification.May 20 2022, 4:09 PM
craig.topper edited the summary of this revision. (Show Details)

Fix typo in comment. Improve the comment a little.

This revision is now accepted and ready to land.May 26 2022, 11:08 AM
This revision was landed with ongoing or failed builds.May 26 2022, 1:13 PM
This revision was automatically updated to reflect the committed changes.