Skip to content

Instantly share code, notes, and snippets.

@SwapnilGaikwad
Created June 22, 2022 13:16
Show Gist options
  • Save SwapnilGaikwad/dbeda0e4614bfe265ac02f83025b612a to your computer and use it in GitHub Desktop.
Save SwapnilGaikwad/dbeda0e4614bfe265ac02f83025b612a 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
ldr q18, [@RWD00]
and v17.2d, v17.2d, v18.2d
umaxv s17, v17.4s
umov w3, v17.s[0]
cmp w3, #0
bne G_M20155_IG04
;; size=32 bbWeight=1 PerfScore 12.00
G_M20155_IG03:
mov x3, x1
ldr q17, [@RWD16]
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 v19.8h, v16.8h, v16.8h
and v19.2d, v19.2d, v18.2d
umaxv s19, v19.4s
umov w5, v19.s[0]
cmp w5, #0
bne G_M20155_IG08
tbl v16.16b, {v16.16b}, v17.16b
add x4, x3, #8
st1 {v16.8b}, [x4]
b G_M20155_IG06
align [0 bytes for IG07]
align [0 bytes]
align [0 bytes]
align [0 bytes]
;; size=72 bbWeight=0.50 PerfScore 9.50
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 q19, [x0, x5]
orr v20.8h, v16.8h, v19.8h
umaxp v20.8h, v20.8h, v20.8h
and v20.2d, v20.2d, v18.2d
umaxv s20, v20.4s
umov w5, v20.s[0]
cmp w5, #0
bne G_M20155_IG10
add x2, x3, x4
uzp1 v16.16b, v16.16b, v19.16b
st1 {v16.16b}, [x2]
add x4, x4, #16
cmp x4, x1
bls G_M20155_IG07
;; size=72 bbWeight=4 PerfScore 82.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 v19.8h, v16.8h, v16.8h
and v18.2d, v19.2d, v18.2d
umaxv s18, v18.4s
umov w0, v18.s[0]
cmp w0, #0
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=44 bbWeight=0.50 PerfScore 5.25
RWD00 dq FF80FF80FF80FF80h, FF80FF80FF80FF80h
RWD16 dq 0E0C0A0806040200h, 0E0C0A0806040200h
; Total bytes of code 268, prolog size 8, PerfScore 140.55, instruction count 71, allocated bytes for code 268 (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