[PATCH] D105935: [AArch64][GlobalISel] Legalize bswap <2 x i16>
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 16:57:47 PDT 2021
jroelofs updated this revision to Diff 358783.
jroelofs retitled this revision from "WIP: [AArch64][GlobalISel] Legalize bswap <2 x i16>" to "[AArch64][GlobalISel] Legalize bswap <2 x i16>".
jroelofs added a comment.
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]
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.358783.patch
Type: text/x-patch
Size: 5991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210714/1c6a0f87/attachment.bin>
More information about the llvm-commits
mailing list