Skip to content
Snippets Groups Projects
Commit 7f56a902 authored by Andrew Pinski's avatar Andrew Pinski
Browse files

match: Delay folding of 1/x into `(x+1u)<2u?x:0` until late [PR113301]


Since currently ranger does not work with the complexity of COND_EXPR in
some cases so delaying the simplification of `1/x` for signed types
help code generation.
tree-ssa/divide-8.c is a new testcase where this can help.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

	PR tree-optimization/113301

gcc/ChangeLog:

	* match.pd (`1/x`): Delay signed case until late.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/divide-8.c: New test.

Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent cd2022f3
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment