setCC

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

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 result for the second instruction? How about setne, setlt,
setgt, setle, and setge? Thanks!

You do not consider setgt, setle, setge, setlt. It was mentioned in class
that you would do an assert on those cases.

-Tanya

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