[PATCH] D105935: WIP: [AArch64][GlobalISel] Legalize bswap <2 x i16>
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 13:11:29 PDT 2021
jroelofs updated this revision to Diff 358712.
jroelofs marked an inline comment as done.
jroelofs added a comment.
Getting closer:
SDAG:
$ ./bin/llc -global-isel=0 -global-isel-abort=1 bswap.ll -mtriple=arm64-apple-ios -o -
.section __TEXT,__text,regular,pure_instructions
.globl _test1 ; -- Begin function test1
.p2align 2
_test1: ; @test1
.cfi_startproc
; %bb.0:
ld1.h { v0 }[0], [x0]
add x8, x0, #2 ; =2
ld1.h { v0 }[2], [x8]
rev32.8b v0, v0
ushr.2s v0, v0, #16
mov.s w8, v0[1]
fmov w9, s0
strh w9, [x0]
strh w8, [x0, #2]
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
GISel:
$ ./bin/llc -global-isel=1 -global-isel-abort=1 bswap.ll -mtriple=arm64-apple-ios -o -
.section __TEXT,__text,regular,pure_instructions
.globl _test1 ; -- Begin function test1
.p2align 2
_test1: ; @test1
.cfi_startproc
; %bb.0:
ldr h0, [x0]
ldr h1, [x0, #2]
mov.h v0[1], v1[0]
mov.s v0[0], v0[0]
rev32.8b v0, v0
ushr.2s v0, v0, #16
mov h1, v0[1]
str h0, [x0]
str h1, [x0, #2]
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105935/new/
https://reviews.llvm.org/D105935
Files:
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105935.358712.patch
Type: text/x-patch
Size: 6762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210714/89a975e0/attachment.bin>
More information about the llvm-commits
mailing list