ptx preliminary rtl patches [3/4]

Richard Biener richard.guenther@gmail.com
Mon Sep 22 08:55:00 GMT 2014


On Thu, Sep 18, 2014 at 8:57 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 09/12/2014 10:04 AM, Richard Biener wrote:
>>
>> On Thu, Sep 11, 2014 at 6:36 PM, Bernd Schmidt <bernds@codesourcery.com>
>> wrote:
>>>
>>> I strongly disagree. It's the same as for any other integer - there's one
>>> sign bit, and since there aren't any other bits, the number of sign bit
>>> copies is always exactly 1.
>>
>>
>> I agree about that.  But I fail to see what goes wrong with the existing
>> code in combine.  Maybe the code simply doesn't work for
>> GET_MODE_PRECISION != GET_MODE_BITSIZE?
>
>
> I had to debug it again - the patch was a year old. This time I came to the
> conclusion that we're just using the wrong mode. We're trying to simplify
> (ne:BI (reg:HI x) (const_int 0)), and the code here was using BImode when
> calling num_sign_bit_copies for the register - what I think it wants to do
> is verify that the operand consists of all zeros or all ones.
>
> Digging a bit further I noticed that some of the cases around this code have
> a mode == GET_MODE (op0) test. These were added by rth in commit 3573fd048,
> which added BImode. It looks like this particular case slipped through the
> cracks. The easiest way to fix it is the below - bootstrapped and tested on
> x86_64-linux, ok if it also works with ptx?

Ok.

Thanks,
Richard.

>
> Bernd
>



More information about the Gcc-patches mailing list