aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-12-30 11:29:27 -0500
committerSanjay Patel <spatel@rotateright.com>2021-12-30 11:52:29 -0500
commit2e3e0a5c288041745f88a06e66a831c236a3bb1f (patch)
tree4cb58a14acaa2fe1f0863bdc2ee8bb9db333cec1 /llvm/unittests/Support/CommandLineTest.cpp
parent23423638cc6901a292d52f6aee8e5042fffb89b2 (diff)
downloadllvm-2e3e0a5c288041745f88a06e66a831c236a3bb1f.zip
llvm-2e3e0a5c288041745f88a06e66a831c236a3bb1f.tar.gz
llvm-2e3e0a5c288041745f88a06e66a831c236a3bb1f.tar.bz2
[InstCombine] fold opposite shifts around an add
((X << C) + Y) >>u C --> (X + (Y >>u C)) & (-1 >>u C) https://alive2.llvm.org/ce/z/DY9DPg This replaces a shift with an 'and', and in the case where the add has a constant operand, it eliminates both shifts. As noted in the TODO comment, we already have this fold when the shifts are in the opposite order (and that code handles bitwise logic ops too). Fixes #52851
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions