On Apr 25, 2011, at 3:54 PM, Chris Lattner wrote: > > On Apr 25, 2011, at 3:30 PM, Fariborz Jahanian wrote: > >> Author: fjahanian >> Date: Mon Apr 25 17:30:02 2011 >> New Revision: 130163 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=130163&view=rev >> Log: >> Ir-gen the side-effect(s) when __builtin_expect is >> constant-folded. // rdar://9330105 > > Hi Fariborz, > > I don't think that this is the right approach, because other evaluatable > expressions can have side effects as well. Does something like this work: > > if (E->Evaluate(Result, CGM.getContext()) && > !Result.hasSideEffects()) { > ... > if (Result.Val.isInt())
Yes, a general solution. In r130172. - Thanks, Fariborz > > > -Chris >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
