llvm-project/clang/lib/Basic
Bob Wilson a7a61e2701 Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455
ARM supports clz and ctz directly and both operations have well-defined
results for zero.  There is no disadvantage in performance to using the
defined-at-zero versions of llvm.ctlz/cttz intrinsics.  We're running into
ARM-specific code written with the assumption that __builtin_clz(0) == 32,
even though that value is technically undefined.  The code is failing now
because of llvm optimizations that are taking advantage of the undef
behavior (specifically svn r147255).  There's nothing wrong with that
optimization on x86 where any incorrect assumptions about __builtin_clz(0)
will quickly be exposed.  For ARM, though, optimizations based on that undef
behavior are likely to cause subtle bugs.  Other targets with defined-at-zero
clz/ctz support may want to override the default behavior as well.

llvm-svn: 149086
2012-01-26 22:14:27 +00:00
..
Builtins.cpp Allow the preprocessor to be constructed without performing target- 2011-09-01 23:39:15 +00:00
CMakeLists.txt Update CMake dependencies. 2011-12-17 20:08:54 +00:00
ConvertUTF.c Move ConvertUTF8toUTF32 out of #if 0, in preparation for a patch which needs it. 2011-11-01 02:10:54 +00:00
Diagnostic.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
DiagnosticIDs.cpp Remove unnecessary default cases in switches over enums. 2012-01-17 02:30:50 +00:00
FileManager.cpp remove unneeded config.h includes 2011-12-22 22:49:47 +00:00
FileSystemStatCache.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
IdentifierTable.cpp Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it) 2012-01-17 06:56:22 +00:00
LangOptions.cpp Add a -cc1-level option -fmodule-name=<name>, which will be used when 2011-11-15 19:35:01 +00:00
Makefile Basic: Simplify getClangRepositoryPath and getClangRevision. 2010-09-29 19:15:29 +00:00
Module.cpp Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it) 2012-01-17 06:56:22 +00:00
SourceLocation.cpp Clean up as many of the comments in Basic I can find to talk in terms of 2011-07-26 05:17:23 +00:00
SourceManager.cpp Fix bugs in SourceManager::computeMacroArgsCache() and add a unit test for it. 2011-12-21 16:56:35 +00:00
TargetInfo.cpp Add support for bitcasts to vector type in Evaluate. 2011-12-22 03:51:45 +00:00
Targets.cpp Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455 2012-01-26 22:14:27 +00:00
TokenKinds.cpp This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling. 2009-11-28 16:09:28 +00:00
Version.cpp Partially revert r147195; lib/Basic/Version.cpp conditionally depends on config.h. 2011-12-26 22:43:17 +00:00
VersionTuple.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00