Following on from rG884351547da2, this patch cleans up the logic for xxpermdi
peephole optimizations by converting two layers of nested ifs to early breaks
and simplifying the logic.
Details
- Reviewers
hfinkel nemanjai jsji lkail steven.zhang - Group Reviewers
Restricted Project - Commits
- rGa0b025b8e7c6: [PowerPC] [NFC] Cleanup xxpermdi peephole optimization
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please attach the test if it is NOT NFC patch, otherwise, adding a tag [NFC] in the title, thank you.
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
350 | Looks like this might have a problem with Stack slots? We used to only handle virtual registers, // 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. |
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
350 | 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. |
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
350 | Ah, good catch. ! isVirtualRegister != isPhysicalRegister ... |
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?