[all-commits] [llvm/llvm-project] 6c2d41: [libclc] Fix int<->float conversion builtins (#126...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Mon Feb 24 01:29:14 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c2d418027be6906733972256e379a844f88fc06
      https://github.com/llvm/llvm-project/commit/6c2d418027be6906733972256e379a844f88fc06
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M libclc/generic/lib/gen_convert.py

  Log Message:
  -----------
  [libclc] Fix int<->float conversion builtins (#126905)

While working on moving the conversion builtins to the CLC library in
25c05541 it was discovered that many weren't passing the OpenCL-CTS
tests.

As it happens, the clspv-specific code for conversion implementations
between integer and floating-point types was more correct. However:

* The clspv code was generating 'sat' conversions to floating-point
types, which are not legal
* The clspv code around rtn/rtz conversions needed tweaking as it wasn't
validating when sizeof(dst) > sizeof(src), e.g., int -> double.

With this commit, the CTS failures seen before have been resolved.

This also assumes that the new implementations are correct also for
clspv. If this is the case, then 'clc' and 'clspv' modes are mutually
exclusive and we can simplify the build process for conversions by not
building clc-clspv-convert.cl.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list