1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib/Transforms/InstCombine
Sanjoy Das ead6e3fe61 Re-apply r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0"
The original checkin was buggy, this change has a fix.

Original commit message:

[InstCombine] Transform A & (L - 1) u< L --> L != 0

Summary:

This transform is never a pessimization at the IR level (since it
replaces an `icmp` with another), and has potentiall payoffs:

 1. It may make the `icmp` fold away or become loop invariant.
 2. It may make the `A & (L - 1)` computation dead.

This shows up in Java, in range checks generated by array accesses of
the form `a[i & (a.length - 1)]`.

Reviewers: reames, majnemer

Subscribers: llvm-commits

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

llvm-svn: 245753
2015-08-21 22:22:37 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp [InstCombine] Generalize sub of selects optimization to all BinaryOperators 2015-07-14 22:39:23 +00:00
InstCombineAndOrXor.cpp Optimize bitwise even/odd test (-x&1 -> x&1) to not use negation. 2015-08-20 15:35:00 +00:00
InstCombineCalls.cpp [InstCombine] SSE/AVX vector shifts demanded shift amount bits 2015-08-13 07:39:03 +00:00
InstCombineCasts.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineCompares.cpp Re-apply r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0" 2015-08-21 22:22:37 +00:00
InstCombineInternal.h [InstCombine] Employ AliasAnalysis in FindAvailableLoadedValue 2015-07-10 06:55:49 +00:00
InstCombineLoadStoreAlloca.cpp Rename Instruction::dropUnknownMetadata() to dropUnknownNonDebugMetadata() 2015-08-20 22:00:30 +00:00
InstCombineMulDivRem.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombinePHI.cpp Revert "[InstCombinePHI] Partial simplification of identity operations." 2015-08-17 03:11:26 +00:00
InstCombineSelect.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineShifts.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
InstCombineSimplifyDemanded.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineVectorOps.cpp [InstSimplify] Teach InstSimplify how to simplify extractelement 2015-07-13 01:15:53 +00:00
InstructionCombining.cpp use minSize wrapper; NFCI 2015-08-18 16:44:23 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Makefile