https://bugs.llvm.org/show_bug.cgi?id=41090

            Bug ID: 41090
           Summary: Need math function in target region
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangb...@nondot.org
          Reporter: xw111lu...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 21605
  --> https://bugs.llvm.org/attachment.cgi?id=21605&action=edit
cmath_modf.cpp

I built the llvm+clang+openmp today and realized there is no math function
support in the target region. Math functions are required for dealing with
numerics. I got two type of errors. One case is missing functions at linking.
The one gives the compiler error.

clang++ -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda cmath_modf.cpp 

I got:
nvlink error   : Undefined reference to 'modff' in
'/tmp/cmath_modf-3ac5b8.cubin'
nvlink error   : Undefined reference to 'modf' in
'/tmp/cmath_modf-3ac5b8.cubin'

I also need sin, sinf, cos, cosf, sincos, sincosf.
For sincos and sincosf, I got similar error as above.
For sin, sinf, cos, cosf, I got:
fatal error: error in backend: Cannot select: 0x629cf70: f32 = fsin
ConstantFP:f32<1.100000e+00>
  0x629d588: f32 = ConstantFP<1.100000e+00>
In function: __omp_offloading_805_364255c_main_l6
clang-9: error: clang frontend command failed with exit code 70 (use -v to see
invocation)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to