[PATCH] Do not transform PHI to select if doing so would be unsafe

David Majnemer david.majnemer at gmail.com
Sun Jun 2 01:08:35 PDT 2013


PR16069 is an interesting case where an incoming value to a PHI is a trap
value while also being a 'ConstantExpr'.

We do not consider this case when performing the 'HoistThenElseCodeToIf'
optimization.

The attached patch will make our modifications more conservative if we
detect that we cannot transform the PHI to a select.

-- 
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130602/0f4a08b1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR16069.diff
Type: application/octet-stream
Size: 2726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130602/0f4a08b1/attachment.obj>


More information about the llvm-commits mailing list