[PATCH] D90131: [PowerPC] Add folding patterns for rlwinm + andi_rec.
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 17:49:00 PST 2020
shchenz added a comment.
This is more clear than the previous version. Some implementation comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:3419
+ // Combine RLWINM + ANDI_rec.
+ // We can treat ANDI_rec as RLWINM_rec with the SH = 0.
+ else if (MI.getOpcode() == PPC::ANDI_rec ||
----------------
Nice catch! Then should we reuse legacy logic? If `ANDI_rec` mask is not runofones, we can not fold `RLWINM + ANDI_rec` to a single `RLWINM`? If `ANDI_rec` mask is runofones, can we treat it as special `rlwinm_rec` with sh = 0, and MB, ME can be got from runofones check?
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