llvm-project/clang/test
Karl-Johan Karlsson 0e525a4d6b [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits
Summary:
The definition of the builtins __builtin_bswap32, __builtin_bitreverse32, __builtin_rotateleft32 and __builtin_rotateright32 rely on that the int type is 32 bits wide on the target.
The defintions of the builtins __builtin_bswap64, __builtin_bitreverse64, __builtin_rotateleft64, and __builtin_rotateright64 rely on that the long long type is 64 bits wide.

On targets where this is not the case (e.g. AVR) clang will generate faulty code (wrong llvm assembler intrinsics).

This patch add support for using 'Z' (the int32_t type) in Bultins.def. The builtins above are changed to be based on the int32_t type instead of the int type, and the int64_t type instead of the long long type.

The AVR backend (experimental) have a native int type that is only 16 bits wide. The supplied testcase will therefore fail if running the testcase on trunk as clang will convert e.g. __builtin_bitreverse32 into llvm.bitreverse.i16 on AVR.

Reviewers: dylanmckay, spatel, rsmith, efriedma

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D61845

llvm-svn: 360863
2019-05-16 07:18:02 +00:00
..
ARCMT
AST Introduce the ability to dump the AST to JSON. 2019-05-13 21:39:55 +00:00
ASTMerge Fix ASTMerge/namespace/test.cpp after r360701 2019-05-14 20:01:03 +00:00
Analysis Revert "[analyzer] Add a test for plugins using checker dependencies" 2019-05-15 20:19:51 +00:00
CXX Fix regression in r360311 caused by reversed bool arguments. 2019-05-16 02:06:16 +00:00
CodeCompletion [CodeComplete] Add a trailing semicolons to some pattern completions 2019-05-06 13:18:00 +00:00
CodeGen [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits 2019-05-16 07:18:02 +00:00
CodeGenCUDA [HIP] Fix visibility of `__constant__` variables. 2019-04-26 19:31:48 +00:00
CodeGenCXX [Sema] Mark array element destructors referenced during initialization 2019-05-10 17:52:26 +00:00
CodeGenCoroutines
CodeGenObjC [CodeGenObjC] invoke objc_autorelease, objc_retain when necessary 2019-05-15 20:15:01 +00:00
CodeGenObjCXX Specify target triple to fix the tests I committed in r360359 that are 2019-05-09 18:32:16 +00:00
CodeGenOpenCL [AMDGPU] gfx1010 clang target 2019-05-13 23:15:59 +00:00
CodeGenOpenCLCXX [OpenCL] Make global ctor init function a kernel 2019-05-09 13:55:44 +00:00
Coverage
CoverageMapping Fix clang tests broken by r353547 that depend on InstrProf 2019-02-10 20:17:07 +00:00
Driver [Driver][Windows] Add dependent lib argument for profile instr generate 2019-05-14 14:01:40 +00:00
FixIt [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
Format
Frontend Add target triple to test. 2019-05-10 20:07:47 +00:00
Headers [OpenMP][Bugfix] Move double and float versions of abs under c++ macro 2019-05-15 20:28:23 +00:00
Import [ASTImporter] Copy Argument Passing Restrictions setting when importing a CXXRecordDecl definition 2019-04-26 18:51:28 +00:00
Index Replace 'REQUIRES: not_?san' with 'UNSUPPORTED: ?san' as that better 2019-05-10 17:57:22 +00:00
Integration
Layout
Lexer Factor out repeated code parsing and concatenating header-names from 2019-03-19 01:51:19 +00:00
Misc [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
Modules [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`. 2019-05-13 22:40:11 +00:00
OpenMP [OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none). 2019-05-09 18:44:53 +00:00
PCH [c++20] Add support for explicit(bool), as described in P0892R2. 2019-05-09 03:59:21 +00:00
Parser Make tentative parsing to detect template-argument-lists less aggressive 2019-05-15 23:36:14 +00:00
Preprocessor Revert r360833 until I can work out the issue with Win32 bots 2019-05-16 03:30:08 +00:00
Profile [PGO] Fix buildbot failure in 359215 2019-04-25 21:16:41 +00:00
Refactor
Rewriter
Sema Add a new language mode for C2x; enable [[attribute]] support by default in C2x. 2019-05-14 12:09:55 +00:00
SemaCUDA Permit redeclarations of a builtin to specify calling convention. 2019-03-21 13:30:56 +00:00
SemaCXX [c++20] For P1327R1: support dynamic_cast in constant expression 2019-05-15 20:22:21 +00:00
SemaObjC Fix for the greendragon bots. 2019-05-08 05:59:25 +00:00
SemaObjCXX Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration" 2019-05-07 03:20:17 +00:00
SemaOpenCL [Sema][OpenCL] Make address space conversions a bit stricter. 2019-05-08 14:23:49 +00:00
SemaOpenCLCXX [OpenCL] Prevent mangling kernel functions. 2019-05-07 14:22:34 +00:00
SemaTemplate Make tentative parsing to detect template-argument-lists less aggressive 2019-05-15 23:36:14 +00:00
TableGen Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Templight
Tooling Remove a bogus sed option in test. 2019-04-08 16:34:38 +00:00
Unit [lit] Set shlibpath_var on AIX 2019-03-29 23:33:04 +00:00
VFS
clang-rename
.clang-format
CMakeLists.txt Revert "[analyzer] Add a test for plugins using checker dependencies" 2019-05-15 20:19:51 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Replace lit feature keyword 'non-ms-sdk' with 'ms-sdk'; eliminate 2019-05-10 13:40:17 +00:00
lit.site.cfg.py.in Moved everything SMT-related to LLVM and updated the cmake scripts. 2019-03-25 17:47:45 +00:00
make_test_dirs.pl