[Bug tree-optimization/88011] [9 regression] r266028 causes a bunch of go failures
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Fri Nov 16 05:45:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88011
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #45013|0 |1
is obsolete| |
Attachment #45018|0 |1
is obsolete| |
--- Comment #8 from Ian Lance Taylor <ian at airs dot com> ---
Created attachment 45019
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45019&action=edit
Standalone test case
An even smaller test case. The miscompilation is definitely in the lehmerGCD
function. The computation `ua+q*ub` is being dropped in the 115t.dom2 pass. I
don't know why. I haven't been able to recreate this in a C test case. I
don't know why.
Note that in Go the division a / b compiles to
a == -1 ? (b == -1 ? 1 : 0) : a / b
and a % b compiles to
a == -1 ? (b == -1 ? 0 : a) : a % b
That is related to this, in that it causes extra basic blocks, and something
about the block merging in dom2 is causing the expression to be discarded.
More information about the Gcc-bugs
mailing list