[PATCH] LICM: Don't crash when an instruction is used by an unreachable BB

David Majnemer david.majnemer at gmail.com
Tue Sep 2 01:11:24 PDT 2014

Hi chandlerc,

BBs might contain non-LCSSA'd values after the LCSSA pass is run if they
are unreachable from the entry block.

Normally, the users of the instruction would be PHIs but the unreachable
BBs have normal users; rewrite their uses to be undef values.

An alternative fix could involve fixing this at LCSSA but that would
require this invariant to hold after subsequent transforms.  If a BB
created an unreachable block, they would be in violation of this.

This fixes PR19798.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5146.13154.patch
Type: text/x-patch
Size: 2213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140902/f7662b9b/attachment.bin>

More information about the llvm-commits mailing list