diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-08-20 22:31:55 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-08-20 22:31:55 +0000 |
commit | e472d8a57ab085370f3bfe12f9604b7566d69c92 (patch) | |
tree | 0087abc620c8e5d81ab603ef0cb83831adafb9e8 /llvm/lib/Transforms/Utils/SplitModule.cpp | |
parent | 8fa7afe683b46ab26f032497b3fab7667ff95f38 (diff) | |
download | llvm-e472d8a57ab085370f3bfe12f9604b7566d69c92.zip llvm-e472d8a57ab085370f3bfe12f9604b7566d69c92.tar.gz llvm-e472d8a57ab085370f3bfe12f9604b7566d69c92.tar.bz2 |
[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: 245635
Diffstat (limited to 'llvm/lib/Transforms/Utils/SplitModule.cpp')
0 files changed, 0 insertions, 0 deletions