https://github.com/DKLoehr created 
https://github.com/llvm/llvm-project/pull/126952

`intrin.h` contains declarations for both `xbegin` and `_xend`, but they should 
already be included transitively from `rtmintrin.h` via `immintrin.h` and/or 
`x86intrin.h`. Having them in both places causes problems if both headers are 
included.

Furthermore, the `intrin.h` declaration of `xbegin` seems to be bugged anyway, 
since it's missing its leading underscore.

Fixes #95133

>From 748451908cc46416dab8ec427e8df656e61d7d94 Mon Sep 17 00:00:00 2001
From: Devon Loehr <dlo...@google.com>
Date: Wed, 12 Feb 2025 18:17:05 +0000
Subject: [PATCH] Remove xbegin and _xend

---
 clang/lib/Headers/intrin.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h
index 376046aeeaf5e..3dd1eb45817d4 100644
--- a/clang/lib/Headers/intrin.h
+++ b/clang/lib/Headers/intrin.h
@@ -162,8 +162,6 @@ void _Store_HLERelease(long volatile *, long);
 void _Store64_HLERelease(__int64 volatile *, __int64);
 void _StorePointer_HLERelease(void *volatile *, void *);
 void _WriteBarrier(void);
-unsigned __int32 xbegin(void);
-void _xend(void);
 
 /* These additional intrinsics are turned on in x64/amd64/x86_64 mode. */
 #if defined(__x86_64__) && !defined(__arm64ec__)

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to