[all-commits] [llvm/llvm-project] f06865: [OpenCL] Fix `mix` builtin overloads

Sven van Haastregt via All-commits all-commits at lists.llvm.org
Fri Mar 5 05:45:31 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f0686569cc5789f93d76461143c232882b7ff2e9
      https://github.com/llvm/llvm-project/commit/f0686569cc5789f93d76461143c232882b7ff2e9
  Author: Sven van Haastregt <sven.vanhaastregt at arm.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M clang/lib/Sema/OpenCLBuiltins.td
    M clang/test/CodeGenOpenCL/fdeclare-opencl-builtins.cl

  Log Message:
  -----------
  [OpenCL] Fix `mix` builtin overloads

`mix` is subtly different from `clamp`: in the overloads where the
last argument is a scalar, the second argument should be a gentype for
`mix`.

As scalars can be implicitly converted to vectors, this cannot be
caught in the Sema test.  Hence adding a CodeGen test, where we can
verify the types using the mangled name.




More information about the All-commits mailing list