This patch tries to catch a codegen opportunity where the rotate and
mask can be merged into a single RLDCL instruction.
Details
- Reviewers
lei nemanjai amyk - Group Reviewers
Restricted Project - Commits
- rG492c1f3d7cf6: [PowerPC] Merge rotate and clear into single instruction.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | ||
---|---|---|
5102 | I'm trying to avoid matching the following kind of pattern: %2 = tail call i64 @llvm.fshl.i64(i64 %word, i64 %word, i64 23) %and1 = and i64 %2, 9223372036854775807 The reason for this is that in the above case we can't use RLDCL but we have to use RLDICL instead. See the function tworotates in the test case. Now, I spent a bit of time and I realize that this condition won't trigger because the above test case is caught earlier by the check in tryBitPermutation. However, I still want to have this here just in case the above changes or the ordering changes in the future. It's just for safety to make sure that we don't try to use an immediate in a place where we shouldn't be using one. |
Added a comment.
Moved a couple of defs closer to where they are used.
Mostly just address remaining nits.
nit: maybe move MB and dl def down to right before it's used on line 5106?