On Thu, Feb 02, 2017 at 12:18:31AM +1030, Alan Modra wrote: > This patch cures PR79286 by restoring the REG_DEAD note test used > prior to r235660, but modified to only exclude insns that may trap. > I'd like to allow combine/move without a REG_DEAD note in loops > because insns in loops often lack such notes, and I recall seeing > quite a few cases at the time I wrote r235660 where loops benefited > from allowing the combine/move to happen.
Ugh, the new testcase fails for x86 -m32 -Os, but not due to ira this time but rather reload. I haven't looked into what is going wrong in reload yet, but the net result is the same: The faulting mem read is moved before the printf call. There were no other testsuite regressions, apart from the random set of fails I have been getting for a long time on x86_64 for c-c++-common/ubsan/float-cast-overflow-10.c, c-c++-common/ubsan/float-cast-overflow-2.c, c-c++-common/ubsan/float-cast-overflow-8.c, and c-c++-common/ubsan/overflow-mul-4.c. What is the correct thing to do for a new testcase that fails like this? Add a dg-fail-if? Assuming I or someone else can't fix the reload fail. The new testcase -Os failure occurs on gcc-4.x, gcc-5 and gcc-6, but gcc-3.4 passes. -- Alan Modra Australia Development Lab, IBM