[PATCH] D90131: [PowerPC] Add folding patterns for rlwinm + andi_rec.
EsmeYi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 23:47:26 PST 2020
Esme added inline comments.
================
Comment at: llvm/test/CodeGen/PowerPC/p10-spill-crlt.ll:78
+; CHECK-NEXT: rlwinm. r3, r30, 0, 30, 30
+; CHECK-NEXT: rlwinm r29, r30, 0, 24, 22
; CHECK-NEXT: mcrf cr2, cr0
----------------
nemanjai wrote:
> nemanjai wrote:
> > Well this is less than ideal. Perhaps we should only do this if the GPR that the `andi.` defines is dead?
> Sorry, this was meant to say that we should check that the GPR that `andi.` **uses** is killed.
> Sorry, this was meant to say that we should check that the GPR that `andi.` **uses** is killed.
@nemanjai Sorry, although I have updated the revision, I am actually a bit confused about this fix. As the comment added in last version (Diff 308919), I assumed the deg was caused by RA.
```
; FIXME: A redundant COPY was generated during RA.
; i.e. rlwinm r29, r30, 0, 24, 22
; mr r30, r29
```
Checking the GPR that andi. uses is killed can skip folding the case and avoid the deg, however is it the cause of the deg? I would be thankful if you have more comments about this issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90131/new/
https://reviews.llvm.org/D90131
More information about the llvm-commits
mailing list