[llvm-dev] fptosi undefined behaviour

Simon Byrne via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 28 03:17:32 PST 2016


Thank Tom and Tim for your responses.

If the behaviour is truly undefined as Tom says, would it be possible
to get checked intrinsics for this?

-Simon

On 22 January 2016 at 20:24, Tim Northover <t.p.northover at gmail.com> wrote:
> 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