Dear ARM Support Team,
I'm having trouble understanding how the svqdmulh_s32 intrinsic behaves when handling negative values.
svqdmulh_s32
Here's a specific case:
int32_t a = 115998720; int32_t b = -27704; int32_t result = (a * b) >> 31; // Expected: -1497
However, when I use svqdmulh_s32, I get 2147483647 instead of -1497.
2147483647
-1497
From what I understand, this intrinsic should behave similarly to the NEON vqdmulhq_s32, which gives the correct result for this case.
vqdmulhq_s32
My build configuration:
-g3 --debug -fno-inline -O0 -MD --target=aarch64-arm-none-eabi -march=armv8-a+sve2
Is it possible that I need to explicitly specify the target processor to get correct behavior? I haven't defined a specific CPU in the toolchain so far.
Any clarification would be greatly appreciated.
Best regards,Yevh
Addressed here:
SVE/SVE2 issue on Cortex-A320 example