[LLVMdev] The nsw story

David A. Greene greened at obbligato.org
Tue Dec 6 09:08:38 PST 2011


Eli Friedman <eli.friedman at gmail.com> writes:

>> But since the add nsw returns undef, then isn't c "sext i32 undef to
>> i64"
>
> Yes.
>
>> and thus also undef?
>
> No: it's some value between INT32_MIN and INT32_MAX.  Think of undef
> as a read from an arbitrary register: you can't predict what it will
> contain, but you know it contains some representable value.

How does undef not cover the above case?  "some value between INT32_MIN
and INT32_MAX" is certainly "some representable value."

                              -Dave



More information about the llvm-dev mailing list