[PATCH] SROA: Don't insert instructions before a PHI

David Majnemer david.majnemer at gmail.com
Mon Sep 1 01:30:35 PDT 2014

Hi chandlerc,

SROA may decide that it needs to insert a bitcast and would set it's
insertion point before a PHI.  This will create an invalid module
right quick.

Instead, choose the first insertion point in the basic block that holds
our PHI.

The only testcase that I've got relies on a very specific uselist, I
haven't managed to come up with something nice and simple.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5141.13136.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140901/7285c199/attachment.bin>

More information about the llvm-commits mailing list