Skip to content

Commit 1999a52

Browse files
etiottoCopilot
andauthored
Update third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 55c896e commit 1999a52

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ using namespace mlir::triton::gpu::intel;
2626
#define S(v) StringAttr::get(ctx, (v))
2727

2828
#if defined(_MSC_VER) && !defined(__clang__)
29-
// from https://gist.github.com/pps83/3210a2f980fd02bb2ba2e5a1fc4a2ef0
29+
// MSVC does not provide the GCC/Clang built-ins __builtin_clz and __builtin_ctz.
30+
// The following implementations use MSVC intrinsics to provide equivalent functionality.
31+
// This is only needed when compiling with MSVC (and not Clang), to ensure cross-platform compatibility.
32+
// See: https://gist.github.com/pps83/3210a2f980fd02bb2ba2e5a1fc4a2ef0
33+
#if defined(_MSC_VER) && !defined(__clang__)
3034
#include <intrin.h>
3135

3236
static int __builtin_clz(unsigned x) {

0 commit comments

Comments
 (0)