[PATCH] Fix ICE in ia64 speculation support

Maxim Kuvyrkov maxim@codesourcery.com
Thu Sep 13 17:42:00 GMT 2007


Hi,

This patch fixes minor bug in ia64 speculation support.

The issue is that may_trap_p () can return different results given 
normal instruction and its speculative version.  E.g., this occurs for 
(set (reg:DF) (mem:DF)) and (set (reg:DF) (unspec:DF [(mem:DF)] 
DATA_SPEC)).  The latter is a speculative variant of the former and 
may_trap_p () always returns 'true' for the speculative version because 
unspec:DF is considered a random floating point operation that might trap.

This causes an assert, that checks that a speculative insn can stay 
speculative, fail.  The fix is to use original pattern when calling 
may_trap_p ().

The bug was reported by Andrey and implicates itself only with '-O2 
-funroll-loops' (the options tested by default do not include this 
combination).  The testcase is a copy of 
gcc.c-torture/execute/20040709-1.c but with forced -funroll-loops.

OK for trunk?


Thanks,

Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bonzo.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070913/d7c2f4cc/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bonzo.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070913/d7c2f4cc/attachment-0001.ksh>


More information about the Gcc-patches mailing list