<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
recursion limit so pathological cases don't blow the stack and/or<br>
cause very long running times.  In this particular case, I believe the<br>
limit is in llvm::ComputeMaskedBits.<br>
<div class="im"><br></div></blockquote><div>I did a few other tests, it does optimization upto six ORs and stops optimizing when there are seven or more OR instructions.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
</div>I don't think there's any way to make a pass perform this optimization<br>
without modifying the LLVM code or writing your own pass to perform<br>
it.  Is this really an important case for you?<br>
<font color="#888888"></font><br></blockquote></div>Optimizing Boolean expressions are really important for me. I may have long straight lines of Boolean operations and then I may want to optimize based on setting a variable to TRUE or FALSE. I think depths larger than six may happen sometimes in my application.<br>
<br>Something extra that I may need is this. I have a line of code a  = b | c. Now I know for some reason that a = FALSE. This implies that b = FALSE and c = FALSE as well. Now I want to propagate all three values in the code and simplify as much as possible. Does by any chance LLVM do this? <br>
<br>Best<br>Ehsan<br>