[PATCH] D105935: WIP: [AArch64][GlobalISel] Legalize bswap <2 x i16>

Jon Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 12:47:49 PDT 2021


jroelofs marked an inline comment as done.
jroelofs added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:3999
       Register InsertReg = MRI.createVirtualRegister(&AArch64::FPR128RegClass);
+      auto SubImm = [&]() {
+        switch (WideTy.getScalarSizeInBits() * NumElts) {
----------------
paquette wrote:
> This looks similar to `getSubRegForClass`? Maybe it's possible to share some code there?
good idea


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:3999
       Register InsertReg = MRI.createVirtualRegister(&AArch64::FPR128RegClass);
+      auto SubImm = [&]() {
+        switch (WideTy.getScalarSizeInBits() * NumElts) {
----------------
paquette wrote:
> jroelofs wrote:
> > paquette wrote:
> > > This looks similar to `getSubRegForClass`? Maybe it's possible to share some code there?
> > good idea
> Also, it'd be nice to have a specific test for G_UNMERGE_VALUES selection. I think that this part + that test could be moved into an independent patch.
https://reviews.llvm.org/D106007


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105935



More information about the llvm-commits mailing list