[PATCH] D75421: [AArch64][GlobalISel] Avoid copies to target register bank for subregister copies
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 10:39:11 PST 2020
paquette added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/subreg-copy.mir:37
+ bb.0:
+ %1:gpr(p0) = G_GLOBAL_VALUE @a
+ %3:gpr(s64) = G_CONSTANT i64 1
----------------
Do you have to use `G_GLOBAL_VALUE` here? Would this work instead?
```
bb.0:
liveins: $x0
%1:gpr(p0) = COPY $x0
```
Then you could replace the `G_LOAD` with
```
%0:fpr(s128) = G_LOAD %1:gpr(p0) :: (load 16)
```
If you can do that, then you can delete the entire IR section in the testcase.
(You might have to add `tracksRegLiveness: true` to make this work)
================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/subreg-copy.mir:43-49
+ %4:gpr(s64) = G_AND %8:gpr, %3:gpr
+ %7:gpr(s32) = G_ICMP intpred(ne), %4:gpr(s64), %5:gpr
+ %6:gpr(s1) = G_TRUNC %7:gpr(s32)
+ G_BRCOND %6:gpr(s1), %bb.1
+
+ bb.1:
+ RET_ReallyLR
----------------
Is anything after the `COPY` necessary to test the behaviour here? Can we just return the result of the COPY? E.g.
```
$x1 = COPY %8:gpr(s64)
RET_ReallyLR implicit $x1
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75421/new/
https://reviews.llvm.org/D75421
More information about the llvm-commits
mailing list