diff options
author | Ju-Zhe Zhong <juzhe.zhong@rivai.ai> | 2023-07-13 16:54:34 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-07-13 21:46:58 +0800 |
commit | 834f34947b20b18696487fc5d2bccab5ea720351 (patch) | |
tree | bfcca51b61e8b18ab658771b8ad9a0dfd1266e3f /gcc/fortran/dump-parse-tree.cc | |
parent | 6f0b0cdb8a2b169169697c5ca533a676d0da4089 (diff) | |
download | gcc-834f34947b20b18696487fc5d2bccab5ea720351.zip gcc-834f34947b20b18696487fc5d2bccab5ea720351.tar.gz gcc-834f34947b20b18696487fc5d2bccab5ea720351.tar.bz2 |
SSA MATH: Support COND_LEN_FMA for floating-point math optimization
Hi, Richard and Richi.
Previous patch we support COND_LEN_* binary operations. However, we didn't
support COND_LEN_* ternary.
Now, this patch support COND_LEN_* ternary. Consider this following case:
__attribute__ ((noipa)) void ternop_##TYPE (TYPE *__restrict dst, \
TYPE *__restrict a, \
TYPE *__restrict b,\
TYPE *__restrict c, int n) \
{ \
for (int i = 0; i < n; i++) \
dst[i] += a[i] * b[i]; \
}
TEST_ALL ()
Before this patch:
...
COND_LEN_MUL
COND_LEN_ADD
Afther this patch:
...
COND_LEN_FMA
gcc/ChangeLog:
* genmatch.cc (commutative_op): Add COND_LEN_*
* internal-fn.cc (first_commutative_argument): Ditto.
(CASE): Ditto.
(get_unconditional_internal_fn): Ditto.
(can_interpret_as_conditional_op_p): Ditto.
(internal_fn_len_index): Ditto.
* internal-fn.h (can_interpret_as_conditional_op_p): Ditt.
* tree-ssa-math-opts.cc (convert_mult_to_fma_1): Ditto.
(convert_mult_to_fma): Ditto.
(math_opts_dom_walker::after_dom_children): Ditto.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions