[llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp

Reid Spencer reid at x10sys.com
Thu Nov 30 21:01:02 PST 2006


On Thu, 2006-11-30 at 20:51 -0800, Chris Lattner wrote:
> On Nov 30, 2006, at 7:56 PM, Reid Spencer wrote:
> 
> >
> >    case Instruction::PtrToInt:
> > -    // Cast of a global address to boolean is always true.
> > -    if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
> > -      if (DestTy == Type::BoolTy && !GV->hasExternalWeakLinkage())
> > -        return ConstantBool::getTrue();
> > -    }
> >      break;
> 
> Thanks Reid, the patch looks great.  I think you can remove this  
> empty case now though,

The default asserts, trying to catch bad opcodes.

> 
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20061130/edd584fd/attachment.sig>


More information about the llvm-commits mailing list