[all-commits] [llvm/llvm-project] b45a73: [InstCombine] Fold binop of shifts with related am...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Jun 28 01:00:39 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b45a73f4d07424b37395f543974ef1ef6dec6332
https://github.com/llvm/llvm-project/commit/b45a73f4d07424b37395f543974ef1ef6dec6332
Author: Nikita Popov <npopov at redhat.com>
Date: 2023-06-28 (Wed, 28 Jun 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/test/Transforms/InstCombine/binop-of-displaced-shifts.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list