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
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
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
Makefile