On 09/07/2015 03:27 PM, Kugan wrote:
On 07/09/15 23:10, Michael Matz wrote:
Hi,
On Mon, 7 Sep 2015, Kugan wrote:
For the following testcase (compiling with -O1; -O2 works fine), we have
a stmt with stm_code SSA_NAME (_7 = _ 6) and for which _6 is defined by
a GIMPLE_CALL. In this case, we are using wrong SUNREG promoted mode
resulting in wrong code.
And why is that?
Simple SSA_NAME copes are generally optimized
but when they are not, we can end up using the wrong promoted mode.
Attached patch fixes when we have one copy.
I think it's the wrong place to fixing up. Where does the wrong use come
from? At that place it should be fixed, not after the fact.
_6 = bar5 (-10);
...
_7 = _6;
_3 = (long unsigned int) _6;
...
if (_3 != l5.0_4)
There is no use of '_7' in this snippet so I don't see the relevance of
SUBREG_PROMOTED_MODE on it.
But whatever you do, please make sure you include the testcase for the
problem as a regression test:
Thanks for the review.
This happens in ARM where definition of PROMOTED_MODE also changes the
sign. I am attaching the cfgdump for the test-case. This is part of the
existing test-case thats why I didn't include it as part of this patch.
Is this another instance of the PROMOTE_MODE issue that was raised by
Jim Wilson a couple months ago?
jeff