Revert "[AArch64][GlobalISel] Legalize bswap <2 x i16>"
authorJon Roelofs <jonathan_roelofs@apple.com>
Wed, 1 Sep 2021 23:49:20 +0000 (16:49 -0700)
committerJon Roelofs <jonathan_roelofs@apple.com>
Wed, 1 Sep 2021 23:49:20 +0000 (16:49 -0700)
commit9237eda3040738e98e985b39ce6a3c1fc71eaa56
tree1f7c5fe41f41b0087ede896ba501afdae3cc5cd9
parentf7bf8a865863ca18f5d566832049982a361fd7f8
Revert "[AArch64][GlobalISel] Legalize bswap <2 x i16>"

This reverts commit 5cd63e9ec2a385de2682949c0bbe928afaf35c91.

https://bugs.llvm.org/show_bug.cgi?id=51707

The sequence feeding in/out of the rev32/ushr isn't quite right:

 _swap:
         ldr     h0, [x0]
         ldr     h1, [x0, #2]
-        mov     v0.h[1], v1.h[0]
+        mov     v0.s[1], v1.s[0]
         rev32   v0.8b, v0.8b
         ushr    v0.2s, v0.2s, #16
-        mov     h1, v0.h[1]
+        mov     s1, v0.s[1]
         str     h0, [x0]
         str     h1, [x0, #2]
         ret
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
llvm/test/CodeGen/AArch64/GlobalISel/legalize-bswap.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir