summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-07-01 15:55:15 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-07-01 15:55:15 +0000
commit72b8d41ce811fa1a20711e0619d4a5307a754e57 (patch)
tree561ad4db85cd579db4488c55fa1b867a037033b9 /llvm/lib/AsmParser/LLParser.h
parent5abf80cdfa347c8b6306157011e7f85212994428 (diff)
downloadbcm5719-llvm-72b8d41ce811fa1a20711e0619d4a5307a754e57.tar.gz
bcm5719-llvm-72b8d41ce811fa1a20711e0619d4a5307a754e57.zip
[InstCombine] Shift amount reassociation in bittest (PR42399)
Summary: Given pattern: `icmp eq/ne (and ((x shift Q), (y oppositeshift K))), 0` we should move shifts to the same hand of 'and', i.e. rewrite as `icmp eq/ne (and (x shift (Q+K)), y), 0` iff `(Q+K) u< bitwidth(x)` It might be tempting to not restrict this to situations where we know we'd fold two shifts together, but i'm not sure what rules should there be to avoid endless combine loops. We pick the same shift that was originally used to shift the variable we picked to shift: https://rise4fun.com/Alive/6x1v Should fix [[ https://bugs.llvm.org/show_bug.cgi?id=42399 | PR42399]]. Reviewers: spatel, nikic, RKSimon Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63829 llvm-svn: 364791
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud