Files
clang-p2996/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Nikita Popov b45a73f4d0 [InstCombine] Fold binop of shifts with related amounts
Fold

  binop(shift(ShiftedC1, ShAmt), shift(ShiftedC2, add(ShAmt, AddC)))
    ->
  shift(binop(ShiftedC1, shift(ShiftedC2, AddC)), ShAmt)

where both shifts are the same and AddC is a valid shift amount.

Proofs: https://alive2.llvm.org/ce/z/PhVVeg

Differential Revision: https://reviews.llvm.org/D152927
2023-06-28 09:54:36 +02:00

99 KiB