This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for (binop (binop (lshift X,Amt),Mask),(lshift Y,Amt)); NFC
ClosedPublic

Authored by goldstein.w.n on Jun 9 2023, 11:02 AM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jun 9 2023, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 11:02 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
goldstein.w.n requested review of this revision.Jun 9 2023, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 11:02 AM

Update tests for new impl

goldstein.w.n retitled this revision from [InstCombine] Add tests for (bitwise (bitwise (lshift X,C),C1),(lshift Y,C)); NFC to [InstCombine] Add tests for (binop (binop (lshift X,Amt),Mask),(lshift Y,Amt)); NFC.Jun 10 2023, 1:08 AM

New tests for new impl details

nikic added a comment.Jun 11 2023, 1:36 PM

I think we're missing some test coverage for different opcode combinations here. I'm not sure if need to test all 46 valid opcode combinations, but I think we at least need more coverage for the invalid combinations. Things like lshr + add on binop1/binop2 etc.

I think we're missing some test coverage for different opcode combinations here. I'm not sure if need to test all 46 valid opcode combinations, but I think we at least need more coverage for the invalid combinations. Things like lshr + add on binop1/binop2 etc.

Done.

More failure tests

Add more add tests

nikic accepted this revision.Jun 12 2023, 12:08 PM

LGTM

llvm/test/Transforms/InstCombine/binop-and-shifts.ll
214 ↗(On Diff #530601)

Stray llvm.assume

This revision is now accepted and ready to land.Jun 12 2023, 12:08 PM

Remove stray assume