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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 05:54:48 PDT 2020


foad marked 3 inline comments as done.
foad added a comment.

In D77152#2053682 <https://reviews.llvm.org/D77152#2053682>, @RKSimon wrote:

> @foad D77316 <https://reviews.llvm.org/D77316> might not be needed for funnel shift lowering now that D80489 <https://reviews.llvm.org/D80489> has landed


True, but we get a slight PowerPC regression instead.



================
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
----------------
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.


================
Comment at: llvm/test/CodeGen/PowerPC/funnel-shift.ll:129-131
+; CHECK-NEXT:    clrlwi 5, 5, 27
+; CHECK-NEXT:    slwi 3, 3, 1
+; CHECK-NEXT:    clrlwi 6, 6, 27
----------------
Ditto.


================
Comment at: llvm/test/CodeGen/PowerPC/funnel-shift.ll:158-159
+; CHECK-NEXT:    not 6, 5
+; CHECK-NEXT:    clrlwi 5, 5, 26
+; CHECK-NEXT:    clrlwi 6, 6, 26
+; CHECK-NEXT:    srd 4, 4, 5
----------------
Ditto.


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