Skip to content

LATX, AVX: streamline integer narrowing and rounded multiply - #449

Closed
luzeng87 wants to merge 1 commit into
lat-opensource:masterfrom
luzeng87:avx-integer-narrowing
Closed

LATX, AVX: streamline integer narrowing and rounded multiply#449
luzeng87 wants to merge 1 commit into
lat-opensource:masterfrom
luzeng87:avx-integer-narrowing

Conversation

@luzeng87

@luzeng87 luzeng87 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use LASX saturating narrowing directly for VPACKUSWB and VPACKUSDW instead of pre-clamping negative lanes
  • avoid unnecessary temporaries and copies for signed and unsigned packing while preserving register-overlap cases
  • replace the expanded VPMULHRSW rounding sequence with the matching LSX/LASX rounded arithmetic shift

Validation

  • clean 3A6000 build: passed
  • signed-to-unsigned saturation boundary cases: passed
  • VPMULHRSW edge cases and 100,000 deterministic input sets: passed
  • JIT, cold AOT, and hot AOT: passed with non-empty AOT files
  • git diff --check: passed

Signed-off-by: Lu Zeng <luzeng87@gmail.com>
@luzeng87
luzeng87 marked this pull request as draft September 3, 2026 03:07
@luzeng87

luzeng87 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by grouped AVX lowering PR #448. The original commit remains separate inside that PR for review.

@luzeng87 luzeng87 closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant