AArch64 doesn't support uadd.with.overflow.i16 natively. This change adds a legalization rule to convert the 32bit add result to 16bit. This should fix PR43981.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 42697 Build 43241: arc lint + arc unit
Event Timeline
Comment Actions
Thanks for fixing this!
LGTM with some minor nits on the test.
Also, can you rename the test to "legalize-uaddo.mir"? That way we can reuse it for any future legalization work we might have to do for G_UADDO.
llvm/test/CodeGen/AArch64/test-uadd16-with-overflow.mir | ||
---|---|---|
2 ↗ | (On Diff #234213) | I would add -verify-machineinstrs to the RUN line here. |
9–20 ↗ | (On Diff #234213) | I'm pretty sure you can delete the registers, liveins, frameInfo, and machineFunctionInfo sections in this test. The legalizer doesn't use any of this information, and so it's not necessary to keep it. |