[gcc(refs/users/mikael/heads/refactor_descriptor_v06_temp)] suppression non_lvalue avec exact_div
Mikael Morin
mikael@gcc.gnu.org
Thu Jun 19 15:30:40 GMT 2025
https://gcc.gnu.org/g:5b84bee6dbab8dddf45598ccdce9ba88162801c6
commit 5b84bee6dbab8dddf45598ccdce9ba88162801c6
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Thu Jun 5 17:11:35 2025 +0200
suppression non_lvalue avec exact_div
Diff:
---
gcc/match.pd | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/match.pd b/gcc/match.pd
index 8c6936b2c04c..4cb9cdd6668f 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -114,6 +114,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
IFN_COND_LEN_FMIN IFN_COND_LEN_FMAX IFN_COND_LEN_COPYSIGN
IFN_COND_LEN_AND IFN_COND_LEN_IOR IFN_COND_LEN_XOR
IFN_COND_LEN_SHL IFN_COND_LEN_SHR)
+/* Binary operators without corresponding conditional operator. */
+(define_operator_list EXTRA_BINARY
+ ceil_div ceil_mod
+ floor_div floor_mod
+ round_div round_mod
+ exact_div)
/* Same for ternary operations. */
(define_operator_list UNCOND_TERNARY
@@ -287,7 +293,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(op @0)))
/* Remove superfluous NON_LVALUE_EXPR in binary operators. */
-(for op (UNCOND_BINARY tcc_comparison)
+(for op (UNCOND_BINARY EXTRA_BINARY tcc_comparison)
(simplify (op (non_lvalue @0) @1)
(op @0 @1))
(simplify (op @0 (non_lvalue @1))
More information about the Gcc-cvs
mailing list