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

Justin Bogner mail at justinbogner.com
Fri Dec 6 11:20:27 PST 2013


"Duncan P. N. Exon Smith" <dexonsmith at apple.com> writes:
> 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.

How tricky is it to come up with a test case that doesn't rely on us
failing to constant fold the icmp here? This one seems a bit fragile.




More information about the llvm-commits mailing list