[all-commits] [llvm/llvm-project] e42def: [HIP] Fix amdgcn builtin for long type

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Jun 3 16:06:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e42def62d8d9572190b31182e5db8c4b3a57cdaf
      https://github.com/llvm/llvm-project/commit/e42def62d8d9572190b31182e5db8c4b3a57cdaf
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2021-06-03 (Thu, 03 Jun 2021)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsAMDGPU.def
    M clang/test/CodeGenCUDA/builtins-amdgcn.cu

  Log Message:
  -----------
  [HIP] Fix amdgcn builtin for long type

Currently some amdgcn builtins are defined with long int type,
which causes invalid IR on Windows since long int is 32 bit
on Windows whereas these builtins have 64 bit arguments.

long long int type cannot be used since it is 128 bit in OpenCL.

This patch uses 64 bit int type instead of long int to define 64 bit int
arguments or return for amdgcn builtins.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D103563




More information about the All-commits mailing list