[llvm-dev] fptosi undefined behaviour

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 22 12:24:44 PST 2016


On 22 January 2016 at 12:20, Tom Stellard via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>> 1) I realise this is a somewhat silly question, but is this still
>> acceptable "undefined behaviour"?
>
> Yes, it is.

I always thought these out-of-range instructions did produce an
"undef" rather than allowing fully-general undefined behaviour
(otherwise we couldn't speculate them, for a start).

If so, I think the code ought to be valid: %1 is *some* i16
bitpattern, which means %2 cannot be completely unconstrained and
should never be equal to %0.

Cheers.

Tim.


More information about the llvm-dev mailing list