[PATCH] Fix a bug in IfConverter with nested predicates

Quentin Colombet qcolombet at apple.com
Tue Jul 23 15:53:45 PDT 2013


Hi Jakob,

Eric suggested that you might be a good candidate to review this patch.

Thanks.

Cheers,

-Quentin

On Jul 23, 2013, at 9:50 AM, Quentin Colombet <qcolombet at apple.com> wrote:

> Ping^2?
> 
> -Quentin
> 
> On Jul 17, 2013, at 9:27 AM, Quentin Colombet <qcolombet at apple.com> wrote:
> 
>> Ping?
>> 
>> -Quentin
>> 
>> On Jul 11, 2013, at 4:39 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> 
>>> Hi,
>>> 
>>> Here is a patch that fixes a bug in IfConverter with nested predicates.
>>> 
>>> The problem seems so obvious that I am wondering if I am missing something.
>>> So although the patch is straightforward (one line change), please review carefully.
>>> Note: I have tested it with -O3 -arch armv7 (apple iOS) against both SingleSource and Multisource tests.
>>> 
>>> ** Context **
>>> Prior to this patch, IfConverter may widen the cases where a sequence of instructions were executed because of the way it uses nested predicates. This result in incorrect execution.
>>> 
>>> For instance, Let A be a basic block that flows conditionally into B and B be a predicated block.
>>> B can be predicated with A.BrToBPredicate into A iff B.Predicate is less "permissive" than A.BrToBPredicate, i.e., iff A.BrToBPredicate subsumes B.Predicate.
>>> 
>>> The IfConverter was checking the opposite: B.Predicate subsumes A.BrToBPredicate.
>>> 
>>> <rdar://problem/14379453>
>>> 
>>> ** Solution **
>>> Check the ‘subsumes’ property correctly.
>>> 
>>> Thanks for your review.
>>> 
>>> Cheers,
>>> 
>>> -Quentin
>>> <IfConverter.svndiff> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130723/85279a80/attachment.html>


More information about the llvm-commits mailing list