A bit of tuning of the arm64 isel: do PUT(..) = 0x0:I64 in a single insn.
commitf719470439e03b757382f769d758f6aa73e22947
authorJulian Seward <jseward@acm.org>
Sat, 2 Jan 2021 15:15:03 +0000 (2 16:15 +0100)
committerJulian Seward <jseward@acm.org>
Sat, 2 Jan 2021 15:15:03 +0000 (2 16:15 +0100)
tree7a11558c78cce63e8942f4e8e3abc4ee8fe2ddec
parent5db136ee369a75b44b857b897b942d8f9e60c366
A bit of tuning of the arm64 isel: do PUT(..) = 0x0:I64 in a single insn.

When running Memcheck, most blocks will do one and often two of `PUT(..) =
0x0:I64`, as a result of the way the front end models arm64 condition codes.
The arm64 isel would generate `mov xN, #0 ; str xN, [xBaseblock, #imm]`,
which is pretty stupid.  This patch changes it to a single insn:
`str xzr, [xBaseblock, #imm]`.

This is a special-case for `PUT(..) = 0x0:I64`.  General-case integer stores
of 0x0:I64 are unchanged.

This gives a 1.9% reduction in generated code size when running
/usr/bin/date on Memcheck.
VEX/priv/host_arm64_defs.c
VEX/priv/host_arm64_defs.h
VEX/priv/host_arm64_isel.c