[PATCH] D153681: [X86] Move back _mulx_u32 to 32-bit only
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 23 20:17:17 PDT 2023
pengfei created this revision.
pengfei added reviewers: probinson, craig.topper, RKSimon.
Herald added a project: All.
pengfei requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
We cannot lower it to mulx at the present due to backend reason.
Since GCC doesn't support it on 64-bit, it's OK to leave it 32-bit only.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153681
Files:
clang/lib/Headers/bmi2intrin.h
Index: clang/lib/Headers/bmi2intrin.h
===================================================================
--- clang/lib/Headers/bmi2intrin.h
+++ clang/lib/Headers/bmi2intrin.h
@@ -35,14 +35,6 @@
return __builtin_ia32_pext_si(__X, __Y);
}
-static __inline__ unsigned int __DEFAULT_FN_ATTRS
-_mulx_u32(unsigned int __X, unsigned int __Y, unsigned int *__P)
-{
- unsigned long long __res = (unsigned long long) __X * __Y;
- *__P = (unsigned int)(__res >> 32);
- return (unsigned int)__res;
-}
-
#ifdef __x86_64__
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
@@ -72,7 +64,17 @@
return (unsigned long long) __res;
}
-#endif /* __x86_64__ */
+#else /* !__x86_64__ */
+
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P)
+{
+ unsigned long long __res = (unsigned long long) __X * __Y;
+ *__P = (unsigned int) (__res >> 32);
+ return (unsigned int) __res;
+}
+
+#endif /* !__x86_64__ */
#undef __DEFAULT_FN_ATTRS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153681.534148.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230624/8c481ea6/attachment.bin>
More information about the cfe-commits
mailing list