This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Fix both sides of '&&' are same
ClosedPublic

Authored by craig.topper on Oct 9 2021, 7:53 PM.

Details

Summary

The operand of the second any_of in EnforceSmallerThan should be
B not S like the FP code in the if below.

Unfortunately, fixing that causes an infinite loop in the build
of RISCV. So I've added a workaround for that as well.

Fixes PR44768.

Diff Detail

Event Timeline

craig.topper created this revision.Oct 9 2021, 7:53 PM
craig.topper requested review of this revision.Oct 9 2021, 7:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2021, 7:53 PM
RKSimon added inline comments.Oct 10 2021, 9:03 AM
llvm/utils/TableGen/CodeGenDAGPatterns.h
300–301

Comments? A magic hack like this needs the explanation as clear as possible and not just mentioned in the cpp implementation.

Improve comments. Add asserts. Handle as a special case in the if structure to make it more readable.

RKSimon accepted this revision.Oct 12 2021, 8:44 AM

LGTM - thanks for looking at this again

This revision is now accepted and ready to land.Oct 12 2021, 8:44 AM
This revision was automatically updated to reflect the committed changes.