[all-commits] [llvm/llvm-project] e3b3c9: [InstCombine] Fix missed opportunity to fold 'or' ...
Craig Topper via All-commits
all-commits at lists.llvm.org
Sun Dec 3 00:51:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3b3c91dd0bbc8bd6f1ee562641daf1e554eb1b6
https://github.com/llvm/llvm-project/commit/e3b3c91dd0bbc8bd6f1ee562641daf1e554eb1b6
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-12-03 (Sun, 03 Dec 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/or.ll
Log Message:
-----------
[InstCombine] Fix missed opportunity to fold 'or' into 'mul' operand. (#74225)
We were able to fold
or (mul X, Y), X --> mul X, (add Y, 1) (when the multiply has no common
bits with X)
This patch makes the transform work if the mul operands are commuted.
More information about the All-commits
mailing list