x64: Improve codegen for vectors with constant shift amounts (#5797)

I stumbled across this working on #5795 and figured this was a nice
opportunity to improve the codegen here.
This commit is contained in:
Alex Crichton
2023-02-16 14:47:59 -06:00
committed by GitHub
parent 1efee4abdf
commit cae3b26623
4 changed files with 344 additions and 63 deletions

View File

@@ -1455,6 +1455,10 @@
(decl shift_mask (Type) u32)
(extern constructor shift_mask shift_mask)
;; Mask a constant with the type's shift mask
(decl shift_amount_masked (Type Imm64) u32)
(extern constructor shift_amount_masked shift_amount_masked)
;; Extract a constant `GprMemImm.Imm` from a value operand.
(decl simm32_from_value (GprMemImm) Value)
(extern extractor simm32_from_value simm32_from_value)