On 07/19/2016 07:39 AM, Bin.Cheng wrote:
On Thu, Jul 14, 2016 at 6:49 PM, Jeff Law <l...@redhat.com> 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  <bin.ch...@arm.com>

        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?
Hi,
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?
This version is OK.  Thanks,
jeff

Reply via email to