[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 25 05:42:45 PST 2022


mgorny reopened this revision.
mgorny added a comment.
This revision is now accepted and ready to land.

In D139723#4004536 <https://reviews.llvm.org/D139723#4004536>, @doru1004 wrote:

> Commit: 07ff3c5ccce68aed6c1a270b3f89ea14de7aa250 <https://reviews.llvm.org/rG07ff3c5ccce68aed6c1a270b3f89ea14de7aa250>

The added test fails on 32-bit platforms:

  ******************** TEST 'Clang :: Headers/amdgcn_openmp_device_math_c.c' FAILED ********************
  Script:
  --
  : 'RUN: at line 2';   /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/clang -cc1 -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/../../../../lib/clang/16/include -nostdsysteminc -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/Inputs/include -x c -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -D__OFFLOAD_ARCH_gfx90a__ -emit-llvm-bc /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/amdgcn_openmp_device_math_c.c -o /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/test/Headers/Output/amdgcn_openmp_device_math_c.c.tmp-host.bc
  : 'RUN: at line 3';   /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/clang -cc1 -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/../../../../lib/clang/16/include -nostdsysteminc -include __clang_hip_runtime_wrapper.h -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/../../lib/Headers/openmp_wrappers -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/Inputs/include -x c -fopenmp -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/amdgcn_openmp_device_math_c.c -fopenmp-is-device -fopenmp-host-ir-file-path /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/test/Headers/Output/amdgcn_openmp_device_math_c.c.tmp-host.bc -o - | /usr/lib/llvm/16/bin/FileCheck /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/amdgcn_openmp_device_math_c.c --check-prefixes=CHECK
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  + : 'RUN: at line 2'
  + /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/clang -cc1 -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/bin/../../../../lib/clang/16/include -nostdsysteminc -internal-isystem /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/Inputs/include -x c -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -D__OFFLOAD_ARCH_gfx90a__ -emit-llvm-bc /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/clang/test/Headers/amdgcn_openmp_device_math_c.c -o /var/tmp/portage/sys-devel/clang-16.0.0_pre20221225/work/x/y/clang-abi_x86_32.x86/test/Headers/Output/amdgcn_openmp_device_math_c.c.tmp-host.bc
  error: OpenMP target architecture 'amdgcn-amd-amdhsa' pointer size is incompatible with host 'i686-pc-linux-gnu'
  
  --
  
  ********************

Please fix or revert.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139723/new/

https://reviews.llvm.org/D139723



More information about the cfe-commits mailing list