On 05/24/2016 07:21 PM, Mikhail Maltsev wrote:
+ target = expand_simple_binop (mode, (diff < 0) ? MINUS : PLUS,
Parentheses around (diff < 0) aren't needed. Otherwise I think this is
also OK.
Bernd
On 05/23/2016 05:15 PM, Kyrill Tkachov wrote:
>
> expand_simple_binop may fail. I think you should add a check that diff_rtx is
> non-NULL
> and bail out early if it is.
>
Fixed.
--
Regards,
Mikhail Maltsev
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index a9c146b..e1473eb 100644
--- a/gcc/ifcvt
Hi Mikhail,
On 23/05/16 15:00, Mikhail Maltsev wrote:
This patch adds a new if-conversion pattern for the following case:
if (test) x = A; else x = B;
A and B are constants, abs(A - B) == 2^N, A != 0, B != 0
Bootstrapped and regtested on x86_64-linux. OK for trunk?
@@ -1453,6 +1460,
This patch adds a new if-conversion pattern for the following case:
if (test) x = A; else x = B;
A and B are constants, abs(A - B) == 2^N, A != 0, B != 0
Bootstrapped and regtested on x86_64-linux. OK for trunk?
--
Regards,
Mikhail Maltsev
gcc/testsuite/ChangeLog:
2016-05-23 Mikhai