This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)


On 11/30/2016 05:46 AM, Segher Boessenkool wrote:
In the testcase, IRA propagates a constant into a TRAP_IF insn, which
then becomes an unconditional trap.  Unconditional traps are control
flow insns so doing this requires surgery on the cfg.  We cannot do
that here, so instead refuse to do the substitution.

Bootstrapping + regression testing on powerpc64-linux {-m64,-m32}
(the bug happened here with -m32); okay for trunk if this succeeds?


Segher


2016-11-30  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/78610
	* ira.c (combine_and_move_insns): Don't substitute into TRAP_IF
	instructions.

gcc/testsuite/
	PR rtl-optimization/78610
	* gcc.c-torture/compile/pr78610.c: New testcase.
Funny how you speculated there could be these issues hiding in the weeds, then just a few days later, one crawls out.

OK. I do wonder if we're going to need a better mechanism for this in the long term, but OK for now.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]