[PATCH] D67606: Change signature of __builtin_rotateright64 back to unsigned
Karl-Johan Karlsson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 01:12:46 PDT 2019
Ka-Ka created this revision.
Ka-Ka added a reviewer: efriedma.
Herald added a subscriber: kristina.
Herald added a project: clang.
The signature of __builtin_rotateright64 was by misstake changed from
unsigned to signed in r360863, this patch will change it back to
unsigned as intended.
This fixes pr43309
Repository:
rC Clang
https://reviews.llvm.org/D67606
Files:
include/clang/Basic/Builtins.def
test/AST/builtins.c
Index: test/AST/builtins.c
===================================================================
--- /dev/null
+++ test/AST/builtins.c
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck %s
+
+unsigned char rotright8(unsigned char x, unsigned char y) {
+ return __builtin_rotateright8(x, y);
+}
+// CHECK: __builtin_rotateright8 'unsigned char (unsigned char, unsigned char)'
+
+unsigned int rotright16(unsigned int x, unsigned int y) {
+ return __builtin_rotateright16(x, y);
+}
+// CHECK: __builtin_rotateright16 'unsigned short (unsigned short, unsigned short)'
+
+unsigned long rotright32(unsigned long x, unsigned long y) {
+ return __builtin_rotateright32(x, y);
+}
+// CHECK: __builtin_rotateright32 'unsigned int (unsigned int, unsigned int)'
+
+unsigned long long rotright64(unsigned long long x, unsigned long long y) {
+ return __builtin_rotateright64(x, y);
+}
+// This verifies pr43309
+// CHECK: __builtin_rotateright64 'unsigned long (unsigned long, unsigned long)'
Index: include/clang/Basic/Builtins.def
===================================================================
--- include/clang/Basic/Builtins.def
+++ include/clang/Basic/Builtins.def
@@ -461,7 +461,7 @@
BUILTIN(__builtin_rotateright8, "UcUcUc", "nc")
BUILTIN(__builtin_rotateright16, "UsUsUs", "nc")
BUILTIN(__builtin_rotateright32, "UZiUZiUZi", "nc")
-BUILTIN(__builtin_rotateright64, "UWiUWiWi", "nc")
+BUILTIN(__builtin_rotateright64, "UWiUWiUWi", "nc")
// Random GCC builtins
BUILTIN(__builtin_constant_p, "i.", "nctu")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67606.220285.patch
Type: text/x-patch
Size: 1562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190916/c58410d0/attachment.bin>
More information about the cfe-commits
mailing list