[Bug tree-optimization/91384] [8/9/10/11 Regression] Compare with negation is not eliminated

2020-12-10 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91384 --- Comment #10 from Richard Biener --- But then void foo (void); void bar (void); int test (int a) { if (a) foo (); else bar (); return -a; } is not optimized either (the usual argument - the user could have written it in the

[Bug tree-optimization/91384] [8/9/10/11 Regression] Compare with negation is not eliminated

2020-12-10 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91384 --- Comment #9 from Richard Biener --- The local gimple transform is not right or wrong, it depends on the surroundings and unless we have a way to assess those in a good way doing it in one or the other way is going to hurt either case. The

[Bug tree-optimization/91384] [8/9/10/11 Regression] Compare with negation is not eliminated

2020-12-10 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91384 --- Comment #8 from Uroš Bizjak --- (In reply to Jakub Jelinek from comment #1) > Started with r223689. Though, generally that change looks like a useful > GIMPLE canonicalization. How about we amend the above change to: diff --git

[Bug tree-optimization/91384] [8/9/10/11 Regression] Compare with negation is not eliminated

2020-12-10 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91384 --- Comment #7 from Uroš Bizjak --- Still happens on trunk.