Fix crash on AArch32 in scalar quantized microkernels
Some scalar quantized microkernels incorrectly generated aligned loads, which
failed on AArch32
PiperOrigin-RevId: 395005213
diff --git a/src/qc8-igemm/gen/2x2-minmax-fp32-scalar-lrint.c b/src/qc8-igemm/gen/2x2-minmax-fp32-scalar-lrint.c
index af59a59..9209ecf 100644
--- a/src/qc8-igemm/gen/2x2-minmax-fp32-scalar-lrint.c
+++ b/src/qc8-igemm/gen/2x2-minmax-fp32-scalar-lrint.c
@@ -89,10 +89,11 @@
float vfpacc1x0 = (float) vacc1x0;
float vfpacc1x1 = (float) vacc1x1;
- const float vscale0 = ((const float*) w)[0];
+ typedef XNN_UNALIGNED float unaligned_float;
+ const float vscale0 = ((const unaligned_float*) w)[0];
vfpacc0x0 *= vscale0;
vfpacc1x0 *= vscale0;
- const float vscale1 = ((const float*) w)[1];
+ const float vscale1 = ((const unaligned_float*) w)[1];
vfpacc0x1 *= vscale1;
vfpacc1x1 *= vscale1;
w = (const void*) ((const float*) w + 2);