This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] optimize reduce(), hmin(), hmax() by reordering the operations.
Needs ReviewPublic

Authored by timshen on Mar 19 2018, 5:45 PM.

Details

Summary

Also change std::plus<_Tp> to std::plus<>/__simd_plus_op, so that the
optimization can transparently use the simd<> overloading.

Event Timeline

timshen created this revision.Mar 19 2018, 5:45 PM
lichray added inline comments.
libcxx/include/experimental/simd
2096

Too long. Consider a traits?

lichray added inline comments.Mar 25 2018, 1:26 AM
libcxx/include/experimental/simd
2196

These conditions are too long, consider

__hmax_impl(const _SimdType& __v, true_type, ...);
__hmax_impl(const _SimdType& __v, false_type, true_type);
__hmax_impl(const _SimdType& __v, false_type, false_type);
miyuki added a subscriber: miyuki.Jul 4 2018, 7:34 AM