Go to file
Matthias Braun e48484c64f InstCombineSimplifyDemanded: Remove nsw/nuw flags when optimizing demanded bits
When optimizing demanded bits of the operands of an Add we have to
remove the nsw/nuw flags as we have no guarantee anymore that we don't
wrap.  This is legal here because the top bit is not demanded.  In fact
this operaion was already performed but missed in the case of an Add
with a constant on the right side.  To fix this this patch refactors the
code to unify the code paths in SimplifyDemandedUseBits() handling of
Add/Sub:

- The transformation of Add->Or is removed from the simplify demand
  code because the equivalent transformation exists in
  InstCombiner::visitAdd()
- KnownOnes/KnownZero are not adjusted for Add x, C anymore as
  computeKnownBits() already performs these computations.
- The simplification of the operands is unified. In this new version
  constant on the right side of a Sub are shrunk now as I could not find
  a reason why not to do so.
- The special case for clearing nsw/nuw in ShrinkDemandedConstant() is
  not necessary anymore as the caller does that already.

Differential Revision: http://reviews.llvm.org/D9415

llvm-svn: 236269
2015-04-30 22:05:30 +00:00
clang InstrProf: Make sure coverage propagates out of foreach loops correctly 2015-04-30 21:31:02 +00:00
clang-tools-extra Disable clang-tools-extra/test/pp-trace/pp-trace-modules.cpp on win32 for now. Investigating. 2015-04-28 17:31:36 +00:00
compiler-rt [UBSan] Make stacktrace-matching CHECK-lines in tests Linux-specific. 2015-04-30 01:21:57 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Allow compilation depending to the LLVM version 2015-04-29 15:37:06 +00:00
libcxx Fix -Wpessimizing-move warning by remove the call to std::move. 2015-04-30 21:47:28 +00:00
libcxxabi Fix syntax error in CMake created when a variable is not defined. 2015-04-29 15:53:03 +00:00
libunwind Make the .eh_frame_hdr code work on FreeBSD as well. 2015-04-29 20:43:44 +00:00
lld [GNU] Remove -x/-X from the list of options to be implemented. 2015-04-29 20:35:58 +00:00
lldb Made macros from modules be injected before our 2015-04-30 21:49:58 +00:00
llgo [llgo] add buildbot-slave config 2015-04-08 01:41:46 +00:00
llvm InstCombineSimplifyDemanded: Remove nsw/nuw flags when optimizing demanded bits 2015-04-30 22:05:30 +00:00
openmp These are the actual changes in the runtime to issue OMPT-related functions. All of them are surrounded by #if OMPT_SUPPORT and can be disabled (which is the default). 2015-04-29 16:42:24 +00:00
polly Update polly for LLVM rename of debug info metadata with DI* prefix 2015-04-29 17:02:14 +00:00