Skip to content

Commit 8f09eb2

Browse files
authored
fix fp32_to_int8 bug (#9335)
1 parent 985d659 commit 8f09eb2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lite/backends/arm/math/type_trans.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ void fp32_to_int8(const float* din,
5757
#ifdef __aarch64__
5858
float32x4_t vmax = vdupq_n_f32(-127.0);
5959
asm volatile(
60+
"0: \n" /* main loop */
6061
"ldp q0, q1, [%[in]], #32 \n"
6162
"ldp q2, q3, [%[in]], #32 \n"
62-
"0: \n" /* main loop */
6363
"fmul v4.4s, v0.4s, %[scale].4s \n"
6464
"fmul v5.4s, v1.4s, %[scale].4s \n"
6565
"fmul v6.4s, v2.4s, %[scale].4s \n"
@@ -74,14 +74,12 @@ void fp32_to_int8(const float* din,
7474
"bif v5.16b, %[vmax].16b, v9.16b \n"
7575
"bif v6.16b, %[vmax].16b, v10.16b \n"
7676
"bif v7.16b, %[vmax].16b, v11.16b \n"
77-
"ldp q0, q1, [%[in]], #32 \n"
7877
"subs %[cnt], %[cnt], #1 \n"
7978
/* fp32 - int32 */
8079
"FCVTAS v8.4s, v4.4s \n"
8180
"FCVTAS v9.4s, v5.4s \n"
8281
"FCVTAS v10.4s, v6.4s \n"
8382
"FCVTAS v11.4s, v7.4s \n"
84-
"ldp q2, q3, [%[in]], #32 \n"
8583
"sqxtn v4.4h, v8.4s \n"
8684
"sqxtn2 v4.8h, v9.4s \n"
8785
"sqxtn v5.4h, v10.4s \n"

0 commit comments

Comments
 (0)