Skip to content

AARCH64: zero-extend dest on ADDV/SMAXV/SMINV/UMAXV/UMINV and FMADD/FMSUB scalar forms#9277

Open
valium007 wants to merge 2 commits into
NationalSecurityAgency:masterfrom
valium007:master
Open

AARCH64: zero-extend dest on ADDV/SMAXV/SMINV/UMAXV/UMINV and FMADD/FMSUB scalar forms#9277
valium007 wants to merge 2 commits into
NationalSecurityAgency:masterfrom
valium007:master

Conversation

@valium007

@valium007 valium007 commented Jun 14, 2026

Copy link
Copy Markdown

Across-lane reductions wrote only the result element and left the upper
bits of the destination SIMD&FP register stale, violating the ARM
zero-extension-on-write semantics. Add zext_z{b,h,s} per element size,
and fix ADDV.8B/.16B which used zext_zq (16-byte clear) for an 8-bit
result. The scalar FMADD and FMSUB constructors (FPR16/FPR32/FPR64) wrote only
the result element and left the upper bits of the destination SIMD&FP
register unchanged, violating the architectural zero-extension-on-write
semantics. The sibling FNMADD/FNMSUB already do this correctly

   Across-lane reductions wrote only the result element and left the upper
   bits of the destination SIMD&FP register stale, violating the ARM
   zero-extension-on-write semantics. Add zext_z{b,h,s} per element size,
   and fix ADDV.8B/.16B which used zext_zq (16-byte clear) for an 8-bit
   result.
The scalar FMADD and FMSUB constructors (FPR16/FPR32/FPR64) wrote only
the result element and left the upper bits of the destination SIMD&FP
register unchanged, violating the architectural zero-extension-on-write
semantics. The sibling FNMADD/FNMSUB already do this correctly.

Add the size-correct zero-extension after each:
  - FPR16 -> zext_zh
  - FPR32 -> zext_zs
  - FPR64 -> zext_zd
@valium007 valium007 changed the title AARCH64: zero-extend dest on ADDV/SMAXV/SMINV/UMAXV/UMINV AARCH64: zero-extend dest on ADDV/SMAXV/SMINV/UMAXV/UMINV and FMADD/FMSUB scalar forms Jun 14, 2026
@ryanmkurtz ryanmkurtz added Feature: Processor/AARCH64 Status: Triage Information is being gathered labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants