Only seteq and setne are legal with pointer types.
For a ptr returned by an alloca, seteq ptr, NULL is always false and
setne ptr, NULL is always true.
--Vikram
-------------------------------------------------------------------------
VIKRAM S. ADVE
Assistant Professor E-MAIL: vadve at cs.uiuc.edu
Department of Computer Science PHONE: (217) 244-2016
Univ. of Illinois at Urbana-Champaign FAX: (217) 244-6869
1304 W. Springfield Ave. WWW: http://www.cs.uiuc.edu/~vadve
Urbana IL 61801-2987.
-------------------------------------------------------------------------
> -----Original Message-----
> From: llvmdev-admin at cs.uiuc.edu [mailto:llvmdev-admin at cs.uiuc.edu]On
> Behalf Of Brian R. Gaeke
> Sent: Saturday, September 28, 2002 12:57 AM
> To: Jianzhong Liu
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] setCC
>
>
> It seems like you should be able to statically evaluate these
> if you assume that NULL is zero and alloca returns an unsigned
> nonzero pointer value.
>
> > what's the semantics for setCC if one of the operands is NULL
pointer?
> > %ptr=alloc int
> > seteq int*, %pt, NULL
> >
> > what's the result for the second instruction? How about setne,
setlt,
> > setgt, setle, and setge? Thanks!
> >
> > Jianzhong
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> --
> gaeke at uiuc.edu
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>