aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-06-29 11:51:50 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-06-29 11:51:50 +0000
commite3a94ba4a928e7c2c94bb82bce0e525212fe38e1 (patch)
tree4021f71cfdc9a6e587492808bec5a5ef85be41ce /llvm/lib/IR/Function.cpp
parentfe107fcde4d29a5d76ccbe9141a2fc8b5dd990f3 (diff)
downloadllvm-e3a94ba4a928e7c2c94bb82bce0e525212fe38e1.zip
llvm-e3a94ba4a928e7c2c94bb82bce0e525212fe38e1.tar.gz
llvm-e3a94ba4a928e7c2c94bb82bce0e525212fe38e1.tar.bz2
[InstCombine] Shift amount reassociation (PR42391)
Summary: Given pattern: `(x shiftopcode Q) shiftopcode K` we should rewrite it as `x shiftopcode (Q+K)` iff `(Q+K) u< bitwidth(x)` This is valid for any shift, but they must be identical. * https://rise4fun.com/Alive/9E2 * exact on both lshr => exact https://rise4fun.com/Alive/plHk * exact on both ashr => exact https://rise4fun.com/Alive/QDAA * nuw on both shl => nuw https://rise4fun.com/Alive/5Uk * nsw on both shl => nsw https://rise4fun.com/Alive/0plg Should fix [[ https://bugs.llvm.org/show_bug.cgi?id=42391 | PR42391]]. Reviewers: spatel, nikic, RKSimon Reviewed By: nikic Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63812 llvm-svn: 364712
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions