summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/rev.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-02-23 02:58:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-02-23 02:58:19 +0000
commitf258a15bdfd63b98c33f7d14aa43c7d3b6e57976 (patch)
tree15fd282d2c8a604f133ff3c15710a246d63b3f3d /llvm/test/CodeGen/ARM/rev.ll
parent91f5ae5022c75fb35b77aeffd5dac4163f456ee8 (diff)
downloadbcm5719-llvm-f258a15bdfd63b98c33f7d14aa43c7d3b6e57976.tar.gz
bcm5719-llvm-f258a15bdfd63b98c33f7d14aa43c7d3b6e57976.zip
Canonicalize (srl (bswap x), 16) to (rotr (bswap x), 16) if the high 16 bits
of x are zero. This optimizes rev + lsr 16 to rev16. rdar://10750814 llvm-svn: 151230
Diffstat (limited to 'llvm/test/CodeGen/ARM/rev.ll')
-rw-r--r--llvm/test/CodeGen/ARM/rev.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/ARM/rev.ll b/llvm/test/CodeGen/ARM/rev.ll
index ea44c28fb70..6bb67431198 100644
--- a/llvm/test/CodeGen/ARM/rev.ll
+++ b/llvm/test/CodeGen/ARM/rev.ll
@@ -112,11 +112,11 @@ entry:
ret i32 %conv3
}
+; rdar://10750814
define zeroext i16 @test9(i16 zeroext %v) nounwind readnone {
entry:
; CHECK: test9
-; CHECK: rev r0, r0
-; CHECK: lsr r0, r0, #16
+; CHECK: rev16 r0, r0
%conv = zext i16 %v to i32
%shr4 = lshr i32 %conv, 8
%shl = shl nuw nsw i32 %conv, 8
OpenPOWER on IntegriCloud