[PATCH] D77152: [SelectionDAG] Better legalization for FSHL and FSHR

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 02:16:13 PDT 2020


foad marked an inline comment as done.
foad added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/funnel-shift.ll:22-24
+; CHECK-NEXT:    clrlwi 5, 5, 27
+; CHECK-NEXT:    srwi 4, 4, 1
+; CHECK-NEXT:    clrlwi 6, 6, 27
----------------
RKSimon wrote:
> foad wrote:
> > This is a slight regression. We need one more instruction overall because of the two clrlwi instructions to mask both normal and the inverted shift amounts.
> Any luck with this?
No. I think it would need a target-specific lowering to take advantage of the fact that shift by 32 is well defined on PowerPC. Can I leave this for a later patch, and/or could a PowerPC expert volunteer to help with it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77152/new/

https://reviews.llvm.org/D77152





More information about the llvm-commits mailing list