[clang] Remove xbegin and _xend (PR #126952)

Devon Loehr via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 13 07:38:55 PST 2025


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

>From 01e40e4d8b3cc2068aa5a022c3acae246b6ac771 Mon Sep 17 00:00:00 2001
From: Devon Loehr <dloehr at google.com>
Date: Wed, 12 Feb 2025 18:17:05 +0000
Subject: [PATCH 1/2] 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__)

>From 76df571382385e77a589971cb0740a07bfb856ed Mon Sep 17 00:00:00 2001
From: Devon Loehr <dloehr at google.com>
Date: Thu, 13 Feb 2025 15:35:02 +0000
Subject: [PATCH 2/2] Add regression test

---
 clang/test/Headers/no-xend.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 clang/test/Headers/no-xend.cpp

diff --git a/clang/test/Headers/no-xend.cpp b/clang/test/Headers/no-xend.cpp
new file mode 100644
index 0000000000000..b2fb1de011557
--- /dev/null
+++ b/clang/test/Headers/no-xend.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple x86_64-pc-win32 \
+// RUN:     -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN:     -ffreestanding -fsyntax-only -Werror -Wsystem-headers \
+// RUN:     -isystem %S/Inputs/include %s
+
+#include <immintrin.h>
+
+#pragma clang attribute push(__attribute__((target("avx"))), apply_to=function)
+#include <intrin.h>
+#pragma clang attribute pop



More information about the cfe-commits mailing list