[PATCH] Fix a bug in IfConverter with nested predicates
Quentin Colombet
qcolombet at apple.com
Thu Jul 11 16:39:35 PDT 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130711/5b2bc64c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IfConverter.svndiff
Type: application/octet-stream
Size: 2962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130711/5b2bc64c/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130711/5b2bc64c/attachment-0001.html>
More information about the llvm-commits
mailing list