<div>Test case?</div><div><br><div class="gmail_quote"><div>On Wed, May 10, 2017 at 8:13 PM Dean Michael Berris via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberris added a comment.<br>
<br>
Drive-by-review.<br>
<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2920<br>
+        UsesInOneBlock = true;<br>
+      } else if (CurrentUserParent != UsersParent) {<br>
+        UsesInOneBlock = false;<br>
----------------<br>
Do you actually need the else here? I suspect CurrentUserParent will never be nullptr, and UsersParent will never be nullptr here either after the preceding conditional.<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2927<br>
+<br>
+    if (UsesInOneBlock) {<br>
+      BasicBlock *BB = I->getParent();<br>
----------------<br>
Maybe clearer if you turn this into an early return?<br>
<br>
```<br>
if (!UsesInOneBlock)<br>
  return false;<br>
<br>
// rest of code.<br>
```<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D33074" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33074</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>