On 09/24/14 13:39, Uros Bizjak wrote:
Hello!
The failure was caused by barrier detection code, which failed to
detect barrier after call insn was to be split when
NOTE_CALL_ARG_LOCATION was present. This problem caused
-fcompare-debug failure.
Digging a bit deeped, and as hinted in the PR, the handling of
barriers in try_split seems to be broken. The code is emitting extra
barrier for non-debug compiles, but it "forgots" to remove the
existing one, leading to duplicated barriers. The barrier is not
detected at all for debug build.
I have removed special handling of barriers here (also, the comment in
removed code was not helpful at all), and this solved -fcompare-debug
failure.
The patch was also bootstrapped and regression tested on
x86_64-linux-gnu {,-m32} which in -m32 mode splits x87 FP jump insns,
and there were no regressions. However, I am not too familiar with
rtl-optimization part and I am not confident that this code surgery is
fully correct, so this is the reason for RFC status of the patch.
2014-09-24 Uros Bizjak <ubiz...@gmail.com>
PR rtl-optimization/63348
* emit-rtl.c (try_split): Do not emit extra barrier.
Good grief, the code you're removing pre-dates any version control we
have. ie, it's in the first revision of emit-rtl.c from 1992. Egad.
It's going to be a hell of a time figuring out why that code exists in
the first place. I don't like removing code if we don't know why the
code exists... Any reason you picked that route rather than looking
forward through the NOTEs to see if they're followed by a suitable BARRIER?
jeff