[PATCH] D120113: [PowerPC] Improve i32 and-or-and on BPS.Select64 path to generate single rlwimi

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 00:53:59 PST 2022


tingwang created this revision.
tingwang added reviewers: jsji, nemanjai, shchenz, PowerPC.
tingwang added a project: LLVM.
Herald added subscribers: steven.zhang, kbarton, hiraditya.
tingwang requested review of this revision.
Herald added a subscriber: llvm-commits.

Some i32 logic operations that have operators without signext are effectively 32-bit operations, and should have been handled by Select32 to generate single rlwimi. However they are combined to 64-bit operations during DAGCombineExtBoolTrunc, and BPS.Select64 is not able to detect the simple pattern.

This patch looks for opportunities on Select64 path, and forward them to Select32 for proper handling to generate single rlwimi instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120113

Files:
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/test/CodeGen/PowerPC/ppc64-rlwimi-and-or-and.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120113.409870.patch
Type: text/x-patch
Size: 4982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220218/910605d3/attachment.bin>


More information about the llvm-commits mailing list