[llvm-commits] [patch] Teach SimplifyCFG about magic pointer constants
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Feb 5 16:04:40 CST 2010
On Feb 5, 2010, at 1:37 PM, Chris Lattner wrote:
> On Feb 5, 2010, at 1:23 PM, Dan Gohman wrote:
>> Hi Jakob,
>> Looks good to me. Just one comment:
> One more comment: It would probably be better to move this code into a simple class, so that TD doesn't have to be passed down at every level.
>> getZExtValue() fails if the integer is wider than 64 bits. To be
>> more general, you can use something like
>> ConstantExpr::getIntegerCast(CI, PtrTy, /*isSigned=*/false)
>> to convert the constant to the appropriate type.
Thanks, committed as r95439
More information about the llvm-commits