Skip to content
  • Jesse Natalie's avatar
    microsoft/compiler: Support casts to and from fp16 · ed2f59f7
    Jesse Natalie authored and Erik Faye-Lund's avatar Erik Faye-Lund committed
    This series supports native 16bit casts in LLVM (e.g. f2f16) for
    when 16bit types are supported by the target hardware. Note that
    only the rtz variant is supported by DXIL, and rtne (and default,
    which CL requires to be rtne) is lowered to a custom cast.
    
    It also supports lowering the specific cast patterns we see used
    by the vload/vstore_half implementations into the special DXIL
    intrinsic for casting between fp32 and fp16, using an i32 value
    to hold the fp16 data in its lower 16 bits.
    ed2f59f7