##horizontal-shl-vector-imm


Vocabulary
compiler.cfg.instructions

Definition
IN: compiler.cfg.instructions

TUPLE: ##horizontal-shl-vector-imm < foldable-insn
dst src1 src2 rep insn# ;


Methods
USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;

M: ##horizontal-shl-vector-imm >avail-insn-defs
[ ] change-dst drop ;


USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;

M: ##horizontal-shl-vector-imm >avail-insn-uses
[ dup >avail-vreg swap or ] change-src1 drop ;


USING: accessors arrays compiler.cfg.instructions
compiler.cfg.value-numbering.expressions
compiler.cfg.value-numbering.graph kernel sequences.private ;

M: ##horizontal-shl-vector-imm >expr
\ ##horizontal-shl-vector-imm swap [ src1>> vreg>vn ] keep
[ src2>> ] keep [ rep>> ] keep drop 4 f <array> 3 swap
[ set-array-nth ] keep 2 swap [ set-array-nth ] keep 1 swap
[ set-array-nth ] keep 0 swap [ set-array-nth ] keep ;


USING: accessors arrays compiler.cfg.gvn.expressions
compiler.cfg.gvn.graph compiler.cfg.instructions kernel
sequences.private ;

M: ##horizontal-shl-vector-imm >expr
\ ##horizontal-shl-vector-imm swap [ src1>> vreg>vn ] keep
[ src2>> ] keep [ rep>> ] keep drop 4 f <array> 3 swap
[ set-array-nth ] keep 2 swap [ set-array-nth ] keep 1 swap
[ set-array-nth ] keep 0 swap [ set-array-nth ] keep ;


USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;

M: ##horizontal-shl-vector-imm assign-insn-defs
[ vreg>reg ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;

M: ##horizontal-shl-vector-imm assign-insn-uses
[ vreg>reg ] change-src1 drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;

M: ##horizontal-shl-vector-imm convert-insn-defs
[ converted-value ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;

M: ##horizontal-shl-vector-imm convert-insn-uses
[ converted-value ] change-src1 drop ;


USING: accessors arrays compiler.cfg.instructions
compiler.cfg.representations.preferred ;

M: ##horizontal-shl-vector-imm defs-vreg-reps rep>> 1array ;


USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;

M: ##horizontal-shl-vector-imm defs-vregs dst>> 1array ;


USING: accessors compiler.cfg.instructions compiler.codegen
cpu.architecture kernel ;

M: ##horizontal-shl-vector-imm generate-insn
[ dst>> ] keep [ src1>> ] keep [ src2>> ] keep
[ rep>> ] keep drop %horizontal-shl-vector-imm ;


USING: accessors compiler.cfg.instructions
compiler.cfg.intrinsics.simd.backend cpu.architecture sequences
;

M: ##horizontal-shl-vector-imm insn-available?
rep>> %horizontal-shl-vector-imm-reps member? ;


USING: accessors compiler.cfg.instructions
compiler.cfg.renaming kernel ;

M: ##horizontal-shl-vector-imm rename-insn-defs
[ rename-value ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.renaming kernel ;

M: ##horizontal-shl-vector-imm rename-insn-uses
[ rename-value ] change-src1 drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;

M: ##horizontal-shl-vector-imm ssa-rename-insn-defs
[ gen-name ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;

M: ##horizontal-shl-vector-imm ssa-rename-insn-uses
[ top-name ] change-src1 drop ;


USING: accessors arrays compiler.cfg.instructions
compiler.cfg.representations.preferred ;

M: ##horizontal-shl-vector-imm uses-vreg-reps rep>> 1array ;


USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;

M: ##horizontal-shl-vector-imm uses-vregs src1>> 1array ;