[PATCH] D71587: [AArch64][GlobalISel]: Fix a crash in GlobalIsel in dealing with 16bit uadd.with.overflow.

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 09:26:10 PST 2019


paquette accepted this revision.
paquette added a comment.
This revision is now accepted and ready to land.

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.



================
Comment at: llvm/test/CodeGen/AArch64/test-uadd16-with-overflow.mir:2
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc %s -run-pass legalizer -march=arm64 -global-isel=1 -o - | FileCheck %s
+
----------------
I would add -verify-machineinstrs to the `RUN` line here.


================
Comment at: llvm/test/CodeGen/AArch64/test-uadd16-with-overflow.mir:9-20
+registers:
+  - { id: 0, class: _ }
+  - { id: 1, class: _ }
+  - { id: 2, class: _ }
+  - { id: 3, class: _ }
+  - { id: 4, class: _ }
+  - { id: 5, class: _ }
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71587/new/

https://reviews.llvm.org/D71587





More information about the llvm-commits mailing list