@@ -855,9 +855,54 @@ let vectorize_operation (width_type : Vectorize_utils.Width_in_bits.t)
855
855
| W32 -> None (* See previous comment *)
856
856
| W16 -> None
857
857
| W8 -> None )
858
- | Istore_int _ | Ioffset_loc _ | Ifloatarithmem _ | Ibswap _ | Irdtsc
859
- | Irdpmc | Ilfence | Isfence | Imfence | Ipause | Isimd _ | Iprefetch _
860
- | Icldemote _ ->
858
+ | Ifloatarithmem _ -> None
859
+ | Istore_int (_n , addressing_mode , is_assignment ) -> (
860
+ if not (Vectorize_utils.Width_in_bits. equal width_type W64 )
861
+ then None
862
+ else
863
+ let extract_store_int_imm (op : Operation.t ) =
864
+ match op with
865
+ | Specific (Istore_int (n , _addr , _is_assign )) -> Int64. of_nativeint n
866
+ | Specific
867
+ ( Ifloatarithmem _ | Ioffset_loc _ | Iprefetch _ | Icldemote _
868
+ | Irdtsc | Irdpmc | Ilfence | Isfence | Imfence | Ipause | Isimd _
869
+ | Ilea _ | Ibswap _ | Isextend32 | Izextend32 )
870
+ | Intop_imm _ | Move | Load _ | Store _ | Intop _ | Alloc _
871
+ | Reinterpret_cast _ | Static_cast _ | Spill | Reload | Const_int _
872
+ | Const_float32 _ | Const_float _ | Const_symbol _ | Const_vec128 _
873
+ | Stackoffset _ | Intop_atomic _ | Floatop _ | Csel _
874
+ | Probe_is_enabled _ | Opaque | Begin_region | End_region
875
+ | Name_for_debugger _ | Dls_get | Poll ->
876
+ assert false
877
+ in
878
+ let consts = List. map extract_store_int_imm cfg_ops in
879
+ match create_const_vec consts with
880
+ | None -> None
881
+ | Some [const_instruction] ->
882
+ let num_args_addressing = Arch. num_args_addressing addressing_mode in
883
+ assert (arg_count = num_args_addressing);
884
+ assert (res_count = 0 );
885
+ assert (Array. length const_instruction.results = 1 );
886
+ let new_reg = Vectorize_utils.Vectorized_instruction. New 0 in
887
+ const_instruction.results.(0 ) < - new_reg;
888
+ let address_args =
889
+ Array. init num_args_addressing (fun i ->
890
+ Vectorize_utils.Vectorized_instruction. Original i)
891
+ in
892
+ let store_operation =
893
+ Operation. Store
894
+ (Onetwentyeight_unaligned , addressing_mode, is_assignment)
895
+ in
896
+ let store_instruction : Vectorize_utils.Vectorized_instruction.t =
897
+ { operation = store_operation;
898
+ arguments = Array. append [| new_reg |] address_args;
899
+ results = [||]
900
+ }
901
+ in
902
+ Some [const_instruction; store_instruction]
903
+ | Some _ -> None )
904
+ | Ioffset_loc _ | Ibswap _ | Irdtsc | Irdpmc | Ilfence | Isfence | Imfence
905
+ | Ipause | Isimd _ | Iprefetch _ | Icldemote _ ->
861
906
None )
862
907
| Alloc _ | Reinterpret_cast _ | Static_cast _ | Spill | Reload
863
908
| Const_float32 _ | Const_float _ | Const_symbol _ | Const_vec128 _
0 commit comments