llvm-project
2ad788bb - [X86][ACE] Add x86_bsr type and Block Scale Register support

Commit
149 days ago
[X86][ACE] Add x86_bsr type and Block Scale Register support This patch adds comprehensive support for the Block Scale Register (BSR), a 1024-bit architectural register used by ACE (AI Compute Extensions) for storing scale factors in mixed-precision matrix operations. - Add x86_bsr as an IR type and update similar to x86_amx Intrinsics Infrastructure: - Add x86_bsr intrinsics in IntrinsicsX86.td: - bsrmovf: Store both halves to hardware BSR - bsrmovh_set/bsrmovl_set: Store individual halves - bsrmovh_get/bsrmovl_get: Read individual halves - bsr_create: Create x86_bsr from two 512-bit vectors - Conversion intrinsics between x86_bsr and vector types X86 Backend: - Add X86LowerBSRType pass to lower x86_bsr SSA values to implicit hardware register operations (similar to X86LowerAMXType) - Handle BSR in register allocation and frame lowering - Reserve BSR during register allocation to prevent conflicts Header and API: - Add __bsr struct type in acev1intrin.h bundling lo/hi 512-bit halves - Add struct-based API: __bsr_make, __bsr_load, __bsr_store, __bsr_get_lo, __bsr_get_hi, __bsr_set_lo, __bsr_set_hi
Author
Committer
Parents
Loading