Skip to content

Incorrect example in docs #113529

Closed
Closed
@xTachyon

Description

@xTachyon

https://llvm.org/docs/LangRef.html#id979

%a = call i8 @llvm.fptosi.sat.i8.f32(float 23.9)               ; yields i8:   23
%b = call i8 @llvm.fptosi.sat.i8.f32(float -130.8)             ; yields i8: -128
%c = call i8 @llvm.fptosi.sat.i8.f32(float 999.0)              ; yields i8:  127
%d = call i8 @llvm.fptosi.sat.i8.f32(float 0xFFF8000000000000) ; yields i8:    0

->

error: floating point constant invalid for type
  %a = call i8 @llvm.fptosi.sat.i8.f32(float 23.9)               ; yields i8:   23
                                             ^

https://godbolt.org/z/d89enc6Eh

The examples seem to be wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issuehttps://github.com/llvm/llvm-project/contributellvmUmbrella label for LLVM issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions