[Bug tree-optimization/83992] wrong debug info: wrong NOTE_INSN_BLOCK_BEG placement causes TestCrashDumpsAllThreads gotools testcase failure
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jan 23 17:29:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83992
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Ugh, the testcase works on x86 solely due to the fact that combine merges:
(insn 12 11 14 4 (parallel [
(set (reg:DI 87 [ ivtmp_1 ])
(plus:DI (reg:DI 87 [ ivtmp_1 ])
(const_int -1 [0xffffffffffffffff])))
(clobber (reg:CC 17 flags))
]) 222 {*adddi_1}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
(insn 14 12 15 4 (set (reg:CCZ 17 flags)
(compare:CCZ (reg:DI 87 [ ivtmp_1 ])
(const_int 0 [0]))) "l.go":6 8 {*cmpdi_ccno_1}
(nil))
to:
(insn 14 12 15 4 (parallel [
(set (reg:CCZ 17 flags)
(compare:CCZ (plus:DI (reg:DI 87 [ ivtmp_1 ])
(const_int -1 [0xffffffffffffffff]))
(const_int 0 [0])))
(set (reg:DI 87 [ ivtmp_1 ])
(plus:DI (reg:DI 87 [ ivtmp_1 ])
(const_int -1 [0xffffffffffffffff])))
]) "l.go":6 230 {*adddi_2}
(nil))
Please note that (insn 12) without location info merges into (insn 14) that has
location info. Otherwise, x86 creates the same ivcanon tree dump:
<bb 4> [local count: 1063004407]:
# j_8 = PHI <[l.go:6:21] 0(3), [l.go:6:45] j_5(6)>
# ivtmp_7 = PHI <2147483647(3), ivtmp_1(6)>
# DEBUG j => j_8
[l.go:6:45] j_5 = j_8 + 1;
[l.go:6:45] # DEBUG j => j_5
# DEBUG j => j_5
ivtmp_1 = ivtmp_7 - 1;
[l.go:6:31] if (ivtmp_1 != 0)
goto <bb 6>; [98.99%]
else
goto <bb 5>; [1.01%]
I agree with Jokub in comment #2, the testcase is fragile.
More information about the Gcc-bugs
mailing list