[Bug tree-optimization/96336] New: Multiple multiplications fails to optimize

2020-07-27 Thread fazedo at gmail dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fazedo at gmail dot com Target Milestone: ---

[Bug tree-optimization/96336] Multiple multiplications fails to optimize

2020-07-27 Thread fazedo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336 --- Comment #1 from Fabio Azevedo --- int f(int x) { return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x; //x**16 } int g(int x) { return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x + x*x; //x**16 + x**2 } Using gcc -O3, the first function simplifies to 4 intege

[Bug tree-optimization/96807] New: Division by zero produces zero with gcc -O2

2020-08-26 Thread fazedo at gmail dot com
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fazedo at gmail dot com Target Milestone: --- Hello, The following code produces 1/0 = 0 with gcc -O2: #include #include int main(int argn, char** argc){ unsigned base = argn>1 ? atoi(arg