[PATCH] D71170: [PowerPC] [NFC] Cleanup xxpermdi peephole optimization
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 18:13:17 PST 2019
steven.zhang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:350
+
+ if (TrueReg1 != TrueReg2 || Register::isPhysicalRegister(TrueReg1))
+ break;
----------------
jsji wrote:
> vddvss wrote:
> > jsji wrote:
> > > Looks like this might have a problem with `Stack slots`? We used to only handle virtual registers,
> > > but now, we might also let throughg stack slots (and Not a register), which might cause build break?
> > >
> > > ```
> > > // 0 Not a register, can be used as a sentinel.
> > > // [1;2^30) Physical registers assigned by TableGen.
> > > // [2^30;2^31) Stack slots. (Rarely used.)
> > > // [2^31;2^32) Virtual registers assigned by MachineRegisterInfo.```
> > Oh, I didn't know about that. I had used `isPhysicalRegister` based on the pattern in D69497. Should I change this or both of them to `!isVirtualRegister`?
> I think so, it is the simplest NFC change. Or else you should go through following code to double check, may sure it won't break anything.
Ah, good catch. ! isVirtualRegister != isPhysicalRegister ...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71170/new/
https://reviews.llvm.org/D71170
More information about the llvm-commits
mailing list