[all-commits] [llvm/llvm-project] 23a5de: [InstCombine] Distributive or+mul with const operand
Allen via All-commits
all-commits at lists.llvm.org
Tue Aug 30 05:40:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 23a5de4294fe3cb03ebd997eafef85f7f33cbc26
https://github.com/llvm/llvm-project/commit/23a5de4294fe3cb03ebd997eafef85f7f33cbc26
Author: zhongyunde <zhongyunde at huawei.com>
Date: 2022-08-30 (Tue, 30 Aug 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
M llvm/test/Transforms/InstCombine/mul.ll
Log Message:
-----------
[InstCombine] Distributive or+mul with const operand
We aleady support the transform: `(X+C1)*CI -> X*CI+C1*CI`
Here the case is a little special as the form of `(X+C1)*CI` is transformed into `(X|C1)*CI`,
so we should also support the transform: `(X|C1)*CI -> X*CI+C1*CI`
Fixes https://github.com/llvm/llvm-project/issues/57278
Reviewed By: bcl5980, spatel, RKSimon
Differential Revision: https://reviews.llvm.org/D132658
More information about the All-commits
mailing list