llvm-project/llvm
Evan Cheng 493eb32ff4 Instcombine was transforming:
%shr = lshr i64 %key, 3
  %0 = load i64* %val, align 8
  %sub = add i64 %0, -1
  %and = and i64 %sub, %shr
  ret i64 %and

to:
  %shr = lshr i64 %key, 3
  %0 = load i64* %val, align 8
  %sub = add i64 %0, 2305843009213693951
  %and = and i64 %sub, %shr
  ret i64 %and

The demanded bit optimization is actually a pessimization because add -1 would
be codegen'ed as a sub 1. Teach the demanded constant shrinking optimization
to check for negated constant to make sure it is actually reducing the width
of the constant.

rdar://11793464

llvm-svn: 160101
2012-07-12 01:45:35 +00:00
..
autoconf Remove autoconf support for runtest and tclsh, some of the last vestigal 2012-06-27 23:53:41 +00:00
bindings [python] Add negative MemoryBuffer testcase 2012-03-22 11:23:52 +00:00
cmake LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not accept whitespace paths. 2012-07-07 03:12:28 +00:00
docs Fixup broken doc link. Patch by Sean Silva <silvas@purdue.edu>. 2012-07-11 21:49:14 +00:00
examples Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h 2012-06-29 12:38:19 +00:00
include Teach the LiveInterval::join function to use the fast merge algorithm, 2012-07-10 22:25:21 +00:00
lib Instcombine was transforming: 2012-07-12 01:45:35 +00:00
projects Remove 'check-dg', a wrapper around 'check-local-dg' which was just 2012-06-28 00:03:13 +00:00
runtime Free the allocated filename. Found by clang static analyzer. 2012-06-15 09:11:47 +00:00
test Instcombine was transforming: 2012-07-12 01:45:35 +00:00
tools Target option DisableJumpTables is a gross hack. Move it to TargetLowering instead. 2012-07-02 22:39:56 +00:00
unittests Revert "IntRange:" as it appears to be breaking self hosting. 2012-07-02 23:22:21 +00:00
utils Machine model: allow itineraries to be shared by different processor models. 2012-07-09 20:43:03 +00:00
.gitignore Add tools/lld to .gitignore. 2012-05-02 21:25:32 +00:00
CMakeLists.txt Hoist LLVM's lit testsuite infrastructure into module so that it can be 2012-06-30 10:14:14 +00:00
CREDITS.TXT Alphabetize. 2012-06-19 23:47:58 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
LLVMBuild.txt
Makefile Do not install llvm-config-host for cross-builds of clang. rdar://11317847 2012-05-09 00:07:02 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in Remove autoconf support for runtest and tclsh, some of the last vestigal 2012-06-27 23:53:41 +00:00
Makefile.rules Remove 'check-dg', a wrapper around 'check-local-dg' which was just 2012-06-28 00:03:13 +00:00
README.txt test commit 2012-07-11 17:34:12 +00:00
configure Regenerate. 2012-06-28 20:35:00 +00:00
llvm.spec.in Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.