[InstCombine] Factor out unreachable inst idiom creation [NFC]
authorPhilip Reames <listmail@philipreames.com>
Wed, 17 Apr 2019 17:37:58 +0000 (17:37 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 17 Apr 2019 17:37:58 +0000 (17:37 +0000)
commit88679717ce44dc31dcb87dc5f0206e9e3348001a
treed65ff3fed9038e0df58437fb270692ccc7d04f7d
parent203958100289f8273bf4bce1a7239cba9e707264
[InstCombine] Factor out unreachable inst idiom creation [NFC]

In InstCombine, we use an idiom of "store i1 true, i1 undef" to indicate we've found a path which we've proven unreachable.  We can't actually insert the unreachable instruction since that would require changing the CFG.  We leave that to simplifycfg later.

This just factors out that idiom creation so we don't duplicate the same mostly undocument idiom creation in multiple places.

llvm-svn: 358600
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp