[PATCH] Fix instcombine's folding of select into phi nodes for ConstantExpr

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Dec 6 09:43:57 PST 2013


This patch fixes PR18143.

InstCombiner::FoldOpIntoPhi assumed that Constant::isNullValue can check for false, but this isn’t true for ConstantExpr.  It appears that this bug was latent until some time after 3.2, when the ConstantExpr in question stopped being constant-folded.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: instcombine-phi-select-constexpr.patch
Type: application/octet-stream
Size: 2038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131206/482a1126/attachment.obj>


More information about the llvm-commits mailing list