Open k-arrows opened 1 month ago
As with https://github.com/llvm/llvm-project/issues/110392, GCC has implemented this in recent patches. Consider the following example. https://godbolt.org/z/M8Pe1G6Ge
#include <arm_sve.h> svint64_t test1 (svbool_t pg) { return svmul_x (pg, svdup_s64 (5), svdup_s64 (3)); } svint64_t test2 (svbool_t pg) { return svdiv_x (pg, svdup_s64 (5), svdup_s64 (3)); }
GCC:
test1(__SVBool_t): mov z0.d, #15 ret test2(__SVBool_t): mov z0.d, #1 ret
Clang:
test1(__SVBool_t): mov z0.d, #5 mul z0.d, z0.d, #3 ret test2(__SVBool_t): mov z0.d, #3 mov z1.d, #5 sdivr z0.d, p0/m, z0.d, z1.d ret
I referred to the GCC patch below. svmul svdiv
@llvm/issue-subscribers-backend-aarch64
Author: None (k-arrows)
As with https://github.com/llvm/llvm-project/issues/110392, GCC has implemented this in recent patches. Consider the following example. https://godbolt.org/z/M8Pe1G6Ge
GCC:
Clang:
I referred to the GCC patch below. svmul svdiv