llvm.org GIT mirror llvm / 1f61092
Add a clarifying comment about branching on poison I recently got this wrong (again), and I'm sure I'm not the only one. Put a comment in the logical place someone would look to "fix" the obvious "missed optimization" which arrises based on the common misunderstanding. Hopefully, this will save others time. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363318 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 4 months ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
43874387 return I->getOperand(1);
43884388
43894389 default:
4390 // Note: It's really tempting to think that a conditional branch or
4391 // switch should be listed here, but that's incorrect. It's not
4392 // branching off of poison which is UB, it is executing a side effecting
4393 // instruction which follows the branch.
43904394 return nullptr;
43914395 }
43924396 }