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] [PR 81245] Fix tree-if-conv calling of update_stmt after fold_stmt

On Fri, Jun 30, 2017 at 1:20 AM, Richard Biener
<> wrote:
> On Thu, Jun 29, 2017 at 10:12 PM, Andrew Pinski <> wrote:
>> Hi,
>>   As described in the bug, tree-if-conv is calling update_stmt on an
>> old stmt which might have been removed from the IR already
>> (transforming of an assignment to a call in this case).  This fixes
>> the problem by calling update_stmt on the new statement that fold_stmt
>> might have created.
>> OK?  Bootstrapped and tested on aarch64-linux-gnu with no regressions.
> update_stmt is not necessary when fold_stmt doesn't return true as
> gsi_insert_before already updates the stmt.
> Thus ok with moving update_stmt under the conditional.

This is what I applied.


> Thanks,
> Richard.
>> Thanks,
>> Andrew Pinski
>> ChangeLog:
>> * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if fold_stmt
>> returned true.
>> testsuite/ChangeLog:
>> * gcc.dg/torture/pr81245.c: New testcase.

Attachment: fixifcvt.diff.txt
Description: Text document

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