summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-08-09 17:26:22 +0000
committerSanjay Patel <spatel@rotateright.com>2018-08-09 17:26:22 +0000
commit15d1501aaefc0d8c86bf90e0abe6cb8d315031f2 (patch)
treea81552f999708e63d9a6aeefd5b385c1334b67e5 /llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
parenta42dec7a1b905fff024fad2c4e02f5b070e3d0c7 (diff)
downloadbcm5719-llvm-15d1501aaefc0d8c86bf90e0abe6cb8d315031f2.tar.gz
bcm5719-llvm-15d1501aaefc0d8c86bf90e0abe6cb8d315031f2.zip
[SelectionDAG] try harder to convert funnel shift to rotate
Similar to rL337966 - if the DAGCombiner's rotate matching was working as expected, I don't think we'd see any test diffs here. AArch only goes right, and PPC only goes left. x86 has both, so no diffs there. Differential Revision: https://reviews.llvm.org/D50091 llvm-svn: 339359
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll b/llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
index 35f46e7154b..fd5f51c9e9f 100644
--- a/llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
+++ b/llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
@@ -145,7 +145,6 @@ define i32 @rotr_i32(i32 %x, i32 %z) {
; CHECK-LABEL: rotr_i32:
; CHECK: # %bb.0:
; CHECK-NEXT: neg 4, 4
-; CHECK-NEXT: clrlwi 4, 4, 27
; CHECK-NEXT: rlwnm 3, 3, 4, 0, 31
; CHECK-NEXT: blr
%f = call i32 @llvm.fshr.i32(i32 %x, i32 %x, i32 %z)
@@ -156,8 +155,7 @@ define i64 @rotr_i64(i64 %x, i64 %z) {
; CHECK-LABEL: rotr_i64:
; CHECK: # %bb.0:
; CHECK-NEXT: neg 4, 4
-; CHECK-NEXT: rlwinm 4, 4, 0, 26, 31
-; CHECK-NEXT: rotld 3, 3, 4
+; CHECK-NEXT: rldcl 3, 3, 4, 0
; CHECK-NEXT: blr
%f = call i64 @llvm.fshr.i64(i64 %x, i64 %x, i64 %z)
ret i64 %f
OpenPOWER on IntegriCloud