@@ -824,7 +824,7 @@ jit_is_finite_emitter::jit_is_finite_emitter(dnnl::impl::cpu::aarch64::jit_gener
824824
825825size_t jit_is_finite_emitter::get_inputs_count () const { return 1 ; }
826826
827- size_t jit_is_finite_emitter::get_aux_vecs_count () const { return 1 ; }
827+ size_t jit_is_finite_emitter::get_aux_vecs_count () const { return 2 ; }
828828
829829size_t jit_is_finite_emitter::get_aux_gprs_count () const { return 1 ; }
830830
@@ -848,24 +848,23 @@ void jit_is_finite_emitter::emit_isa(const std::vector<size_t> &in_vec_idxs, con
848848
849849 TReg src = TReg (in_vec_idxs[0 ]);
850850 TReg dst = TReg (out_vec_idxs[0 ]);
851- TReg aux = TReg (aux_vec_idxs[0 ]);
851+ TReg aux0 = TReg (aux_vec_idxs[0 ]);
852+ TReg aux1 = TReg (aux_vec_idxs[1 ]);
852853
853854 // According to the IEEE standard, NaN values have the odd property that comparisons involving them are always false.
854- h->fcmeq (dst.s , src.s , src.s );
855- h->ld1r (aux.s , table_val2 (" zero" ));
856- h->fcmeq (dst.s , dst.s , aux.s );
855+ h->fcmeq (aux0.s , src.s , src.s );
856+ h->not_ (aux0.b16 , aux0.b16 );
857857
858858 h->fabs (src.s , src.s );
859- h->ld1r (aux .s , table_val2 (" inf" ));
860- h->fcmeq (src.s , src.s , aux .s );
859+ h->ld1r (aux1 .s , table_val2 (" inf" ));
860+ h->fcmeq (src.s , src.s , aux1 .s );
861861
862- h->orr (dst.b16 , dst .b16 , src.b16 );
862+ h->orr (dst.b16 , aux0 .b16 , src.b16 );
863863
864- h->ld1r (aux.s , table_val2 (" zero" ));
865- h->fcmeq (dst.s , dst.s , aux.s );
864+ h->not_ (dst.b16 , dst.b16 );
866865
867- h->ld1r (aux .s , table_val2 (" one" ));
868- h->and_ (dst.b16 , dst.b16 , aux .b16 );
866+ h->ld1r (aux0 .s , table_val2 (" one" ));
867+ h->and_ (dst.b16 , dst.b16 , aux0 .b16 );
869868}
870869
871870void jit_is_finite_emitter::register_table_entries () {
0 commit comments