From: Jakub Jelinek Date: Fri, 12 Jun 2015 11:55:11 +0000 (+0200) Subject: backport: re PR target/62642 (x86 rdtsc is moved through barrier) X-Git-Tag: releases/gcc-4.8.5~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bd701b5455d1835f67328ddf1268d33d9a731d3;p=thirdparty%2Fgcc.git backport: re PR target/62642 (x86 rdtsc is moved through barrier) Backported from mainline 2014-12-15 Vladimir Makarov PR target/62642 * ira.c (rtx_moveable_p): Prevent UNSPEC_VOLATILE moves. From-SVN: r224421 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bea147c5b3db..d6cf625fccf1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-06-12 Jakub Jelinek + + Backported from mainline + 2014-12-15 Vladimir Makarov + + PR target/62642 + * ira.c (rtx_moveable_p): Prevent UNSPEC_VOLATILE moves. + 2015-06-12 Jakub Jelinek PR middle-end/63608 diff --git a/gcc/ira.c b/gcc/ira.c index 385441a4302c..6a33aeae33ec 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -3878,6 +3878,12 @@ rtx_moveable_p (rtx *loc, enum op_type type) case CLOBBER: return rtx_moveable_p (&SET_DEST (x), OP_OUT); + case UNSPEC_VOLATILE: + /* It is a bad idea to consider insns with with such rtl + as moveable ones. The insn scheduler also considers them as barrier + for a reason. */ + return false; + default: break; }