------- Comment #7 from bonzini at gnu dot org 2009-03-25 16:49 ------- > one is the rtx_cost (SET_SRC (set), SET, speed) > old_cost check > (I wonder whether it is needed for asms at all and if yes, how to actually do > it)
For addresses it is already done in should_replace_address. But for everything else, there could be problems if one uses x = 0x123456789abcdef; and fwprop propagates x into the asm. If they used a "r" constraint (correctly), reload probably will fix everything, but it may cause pessimizations or I don't know what. Sorry for the handwaving---the reason I am a bit weary about propagating into asms is that we are quite careful about it on the tree level. pr39543-3.c crashes on f1 with optimization, but crashes on f2 without optimization. Which means that for f2, cse_not_expected does not work because gimplification effectively has already done the same as force_reg. In my opinion that's the root cause: we worry about making asms complex, but we're cavalier in making them simpler (hoping that something later restores the complexity). For 4.5, maybe SSA expansion fixes this? (pr39543-3.c in Jakub's patch). If so, modifying fwprop is probably not the best thing to do. -- bonzini at gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-03-25 16:49:20 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39543