[PATCH] Use getFirstNonPHI to set the insertion point for PHIs
mail at justinbogner.com
Thu Sep 26 14:35:56 PDT 2013
When creating new PHI instructions in SLPVectorizer and LoopVectorize,
we're setting the insertion point using getFirstInsertionPt. This does
the wrong thing when landingpads are present, since getFirstInsertionPt
skips past these.
The attached patch uses getFirstNonPHI instead, and adds a testcase that
crashes without the patch and passes with. Can someone please commit?
In the long term, it'd be nice if we had a better way to enforce using
this API correctly. I'm not sure what the best way to do this is. Any
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3981 bytes
Desc: not available
More information about the llvm-commits