[PATCH] D105935: WIP: [AArch64][GlobalISel] Legalize bswap <2 x i16>
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 13:23:51 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:1017
+ auto Copy = MIRBuilder.buildBitcast(v8s8, Insert);
+ auto Rev32 = MIRBuilder.buildInstr(AArch64::REV32v8i8, {v8s8}, {Copy});
+ constrainSelectedInstRegOperands(*Rev32, *ST->getInstrInfo(),
----------------
Can you use G_REV32 here instead? (see: AArch64InstrGISel.td)
I think it's preferable to keep the results of legalization as generic as possible.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:1022
+ auto Bitcast3 = MIRBuilder.buildBitcast(v2s32, Rev32);
+ auto UShr = MIRBuilder.buildInstr(AArch64::USHRv2i32_shift, {v2s32},
+ {Bitcast3, 16ULL});
----------------
Is it possible to use a generic instruction here?
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