llvm-6502/lib/Transforms/InstCombine
Shuxin Yang a09e18fcfa For rdar://12329730, last piece.
This change attempts to simplify (X^Y) -> X or Y in the user's context if we know that
only bits from X or Y are demanded.

  A minimized case is provided bellow. This change will simplify "t>>16" into "var1 >>16".

  =============================================================
  unsigned foo (unsigned val1, unsigned val2) {
    unsigned t = val1 ^ 1234;
    return (t >> 16) | t; // NOTE: t is used more than once.
  }
  =============================================================

  Note that if the "t" were used only once, the expression would be finally optimized as well.
However, with with this change, the optimization will take place earlier.

  Reviewed by Nadav, Thanks a lot!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 22:15:32 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
InstCombine.h Sort includes for all of the .h files under the 'lib' tree. These were 2012-12-04 07:12:27 +00:00
InstCombineAddSub.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
InstCombineAndOrXor.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineCalls.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineCasts.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineCompares.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineLoadStoreAlloca.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineMulDivRem.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombinePHI.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineSelect.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineShifts.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineSimplifyDemanded.cpp For rdar://12329730, last piece. 2012-12-04 22:15:32 +00:00
InstCombineVectorOps.cpp [InstCombine] Teach InstCombine how to handle an obfuscated splat. 2012-10-16 21:29:38 +00:00
InstCombineWorklist.h Sort includes for all of the .h files under the 'lib' tree. These were 2012-12-04 07:12:27 +00:00
InstructionCombining.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00