[libclc] r275813 - Replace llvm.AMDGPU.ldexp with llvm.amdgcn.ldexp

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 18 09:42:50 PDT 2016


Author: arsenm
Date: Mon Jul 18 11:42:50 2016
New Revision: 275813

URL: http://llvm.org/viewvc/llvm-project?rev=275813&view=rev
Log:
Replace llvm.AMDGPU.ldexp with llvm.amdgcn.ldexp

It didn't really work on r600 to begin with, which should
get its own intrinsic.

Added:
    libclc/trunk/amdgcn/lib/math/
    libclc/trunk/amdgcn/lib/math/ldexp.cl
      - copied, changed from r273044, libclc/trunk/amdgpu/lib/math/ldexp.cl
Removed:
    libclc/trunk/amdgpu/lib/math/ldexp.cl
Modified:
    libclc/trunk/amdgcn/lib/SOURCES
    libclc/trunk/amdgpu/lib/SOURCES

Modified: libclc/trunk/amdgcn/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgcn/lib/SOURCES?rev=275813&r1=275812&r2=275813&view=diff
==============================================================================
--- libclc/trunk/amdgcn/lib/SOURCES (original)
+++ libclc/trunk/amdgcn/lib/SOURCES Mon Jul 18 11:42:50 2016
@@ -1,3 +1,4 @@
+math/ldexp.cl
 synchronization/barrier_impl.ll
 workitem/get_group_id.ll
 workitem/get_local_id.ll

Copied: libclc/trunk/amdgcn/lib/math/ldexp.cl (from r273044, libclc/trunk/amdgpu/lib/math/ldexp.cl)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgcn/lib/math/ldexp.cl?p2=libclc/trunk/amdgcn/lib/math/ldexp.cl&p1=libclc/trunk/amdgpu/lib/math/ldexp.cl&r1=273044&r2=275813&rev=275813&view=diff
==============================================================================
--- libclc/trunk/amdgpu/lib/math/ldexp.cl (original)
+++ libclc/trunk/amdgcn/lib/math/ldexp.cl Mon Jul 18 11:42:50 2016
@@ -25,7 +25,7 @@
 #include "../../../generic/lib/clcmacro.h"
 
 #ifdef __HAS_LDEXPF__
-#define BUILTINF __builtin_amdgpu_ldexpf
+#define BUILTINF __builtin_amdgcn_ldexpf
 #else
 #include "math/clc_ldexp.h"
 #define BUILTINF __clc_ldexp
@@ -37,7 +37,7 @@ _CLC_DEFINE_BINARY_BUILTIN(float, ldexp,
 #ifdef cl_khr_fp64
   #pragma OPENCL EXTENSION cl_khr_fp64 : enable
     // This defines all the ldexp(doubleN, intN) variants.
-  _CLC_DEFINE_BINARY_BUILTIN(double, ldexp, __builtin_amdgpu_ldexp, double, int);
+  _CLC_DEFINE_BINARY_BUILTIN(double, ldexp, __builtin_amdgcn_ldexp, double, int);
 #endif
 
 // This defines all the ldexp(GENTYPE, int);

Modified: libclc/trunk/amdgpu/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgpu/lib/SOURCES?rev=275813&r1=275812&r2=275813&view=diff
==============================================================================
--- libclc/trunk/amdgpu/lib/SOURCES (original)
+++ libclc/trunk/amdgpu/lib/SOURCES Mon Jul 18 11:42:50 2016
@@ -1,5 +1,4 @@
 atomic/atomic.cl
-math/ldexp.cl
 math/nextafter.cl
 math/sqrt.cl
 workitem/get_num_groups.ll

Removed: libclc/trunk/amdgpu/lib/math/ldexp.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgpu/lib/math/ldexp.cl?rev=275812&view=auto
==============================================================================
--- libclc/trunk/amdgpu/lib/math/ldexp.cl (original)
+++ libclc/trunk/amdgpu/lib/math/ldexp.cl (removed)
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2014 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include <clc/clc.h>
-
-#include "../../../generic/lib/clcmacro.h"
-
-#ifdef __HAS_LDEXPF__
-#define BUILTINF __builtin_amdgpu_ldexpf
-#else
-#include "math/clc_ldexp.h"
-#define BUILTINF __clc_ldexp
-#endif
-
-// This defines all the ldexp(floatN, intN) variants.
-_CLC_DEFINE_BINARY_BUILTIN(float, ldexp, BUILTINF, float, int);
-
-#ifdef cl_khr_fp64
-  #pragma OPENCL EXTENSION cl_khr_fp64 : enable
-    // This defines all the ldexp(doubleN, intN) variants.
-  _CLC_DEFINE_BINARY_BUILTIN(double, ldexp, __builtin_amdgpu_ldexp, double, int);
-#endif
-
-// This defines all the ldexp(GENTYPE, int);
-#define __CLC_BODY <../../../generic/lib/math/ldexp.inc>
-#include <clc/math/gentype.inc>
-
-#undef BUILTINF




More information about the cfe-commits mailing list