Skip to content

Instantly share code, notes, and snippets.

@SwapnilGaikwad
Created June 22, 2022 13:13
Show Gist options
  • Save SwapnilGaikwad/a1d5e6481cd2fea948647303bcad4ee5 to your computer and use it in GitHub Desktop.
Save SwapnilGaikwad/a1d5e6481cd2fea948647303bcad4ee5 to your computer and use it in GitHub Desktop.
G_M20155_IG01:
stp fp, lr, [sp,#-16]!
mov fp, sp
;; size=8 bbWeight=1 PerfScore 1.50
G_M20155_IG02:
ld1 {v16.8h}, [x0]
umaxp v17.8h, v16.8h, v16.8h
umov x3, v17.d[0]
tst x3, #0xd1ffab1e
bne G_M20155_IG04
;; size=20 bbWeight=1 PerfScore 6.50
G_M20155_IG03:
mov x3, x1
ldr q17, [@RWD00]
tbl v16.16b, {v16.16b}, v17.16b
st1 {v16.8b}, [x3]
mov x4, #8
tbnz w1, #3, G_M20155_IG06
add x5, x0, #16
ld1 {v16.8h}, [x5]
umaxp v18.8h, v16.8h, v16.8h
umov x5, v18.d[0]
tst x5, #0xd1ffab1e
bne G_M20155_IG08
tbl v16.16b, {v16.16b}, v17.16b
add x4, x3, #8
st1 {v16.8b}, [x4]
b G_M20155_IG06
align [4 bytes for IG07]
align [4 bytes]
align [0 bytes]
align [0 bytes]
;; size=72 bbWeight=0.50 PerfScore 7.75
G_M20155_IG04:
mov x0, xzr
;; size=4 bbWeight=0.50 PerfScore 0.25
G_M20155_IG05:
ldp fp, lr, [sp],#16
ret lr
;; size=8 bbWeight=0.50 PerfScore 1.00
G_M20155_IG06:
and x1, x1, #15
mov x4, #16
sub x4, x4, x1
sub x1, x2, #16
;; size=16 bbWeight=0.50 PerfScore 1.00
G_M20155_IG07:
lsl x2, x4, #1
ldr q16, [x0, x2]
add x2, x4, #8
lsl x5, x2, #1
ldr q18, [x0, x5]
orr v19.8h, v16.8h, v18.8h
umaxp v19.8h, v19.8h, v19.8h
umov x5, v19.d[0]
tst x5, #0xd1ffab1e
bne G_M20155_IG10
add x2, x3, x4
uzp1 v16.16b, v16.16b, v18.16b
st1 {v16.16b}, [x2]
add x4, x4, #16
cmp x4, x1
bls G_M20155_IG07
;; size=64 bbWeight=4 PerfScore 68.00
G_M20155_IG08:
mov x0, x4
;; size=4 bbWeight=0.50 PerfScore 0.25
G_M20155_IG09:
ldp fp, lr, [sp],#16
ret lr
;; size=8 bbWeight=0.50 PerfScore 1.00
G_M20155_IG10:
umaxp v18.8h, v16.8h, v16.8h
umov x0, v18.d[0]
tst x0, #0xd1ffab1e
bne G_M20155_IG08
add x4, x3, x4
tbl v16.16b, {v16.16b}, v17.16b
st1 {v16.8b}, [x4]
mov x4, x2
b G_M20155_IG08
;; size=36 bbWeight=0.50 PerfScore 3.50
RWD00 dq 0E0C0A0806040200h, 0E0C0A0806040200h
; Total bytes of code 240, prolog size 8, PerfScore 114.75, instruction count 62, allocated bytes for code 240 (MethodHash=74c3b144) for method System.Text.Tests.Demo:NarrowUtf16ToAscii_Intrinsified(long,long,long):long
; ============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment