This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH PR71503/PR71683]Fix ICE in tree-if-conv.c

On Thu, Jul 14, 2016 at 6:49 PM, Jeff Law <> wrote:
> On 07/14/2016 10:12 AM, Bin Cheng wrote:
>> Hi,
>> This is a simple patch fixing ICE in tree-if-conv.c.  Existing code does
>> not setup a variable (cond) when predicate of basic block is true and it
>> asserts on the variable.  Interesting thing is dead code is not cleaned up
>> before ifcvt, but that's another story.
>> Bootstrap and test on x86_64.  Is it OK?
>> Thanks,
>> bin
>> 2016-07-13  Bin Cheng  <>
>>         PR tree-optimization/71503
>>         PR tree-optimization/71683
>>         * tree-if-conv.c (gen_phi_arg_condition): Set cond when predicate
>>         is true.
> Maybe I'm missing something, but in the case where we COND is already set
> and we encounter a true predicate later, shouldn't that make the result true
> as well?
> I don't think the code will though -- we just throw away the true condition.
> ISTM that the right thing to do is
> if (is_true_predicate (c))
>   {
>     cond = c;
>     continue;
>   }
> Can you see if you can trigger a case where we have an existing cond, then
> later find a true condition to verify the right thing happens?
Attachment is the updated patch, it breaks the loop once TRUE
predicate is found.  I also built spec2k6/spec2k and your case is not
found.  Is it OK?


Attachment: pr71503-20160711.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]