From 856ecbc0680beaff74891cac5917678acb080dc9 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Mon, 14 Apr 2014 12:59:52 +0000 Subject: ARM64: remove buggy REV16 pattern. The 32-bit pattern is still valid: 0123 -> 3210 -> 1032. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206172 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ARM64/rev.ll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/CodeGen') diff --git a/test/CodeGen/ARM64/rev.ll b/test/CodeGen/ARM64/rev.ll index 867d5b3c51..0006ea3317 100644 --- a/test/CodeGen/ARM64/rev.ll +++ b/test/CodeGen/ARM64/rev.ll @@ -36,10 +36,13 @@ entry: ret i32 %tmp14 } +; 64-bit REV16 is *not* a swap then a 16-bit rotation: +; 01234567 ->(bswap) 76543210 ->(rotr) 10765432 +; 01234567 ->(rev16) 10325476 define i64 @test_rev16_x(i64 %a) nounwind { entry: ; CHECK-LABEL: test_rev16_x: -; CHECK: rev16 x0, x0 +; CHECK-NOT: rev16 x0, x0 %0 = tail call i64 @llvm.bswap.i64(i64 %a) %1 = lshr i64 %0, 16 %2 = shl i64 %0, 48 -- cgit v1.2.3