This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Implement narrowScalar for SADDE/SSUBE/UADDE/USUBE
ClosedPublic

Authored by porglezomp on Feb 14 2021, 3:39 PM.

Diff Detail

Event Timeline

porglezomp created this revision.Feb 14 2021, 3:39 PM
porglezomp requested review of this revision.Feb 14 2021, 3:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2021, 3:39 PM

Change unittest buildInstr to more specific build* calls

Remove ";" file I accidentally added

Harbormaster completed remote builds in B89769: Diff 324726.
arsenm added inline comments.Feb 18 2021, 2:56 PM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
4511

No Optional

Change Optional<Register> to Register, change a >= to == since it's all that's needed

arsenm accepted this revision.Feb 18 2021, 6:36 PM

LGTM with test nits

llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
1052–1053

EXPECT_EQ(Legalized, ...)

1078–1081

You don't actually need to define the legalizer rule since you are directly calling the implementation

1091–1092

EXPECT_EQ

1130–1131

EXPECT_EQ

1169–1170

EXPECT_EQ

This revision is now accepted and ready to land.Feb 18 2021, 6:36 PM

Change some EXPECT_TRUE to EXPECT_EQ

arsenm added inline comments.Feb 19 2021, 5:32 AM
llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
1052–1053

These should be swapped to get the correct failure message

Flip argument order of EXPECT_EQ for better failure messages