[all-commits] [llvm/llvm-project] 131401: [InstCombine] Relax constraints of uses for exp(X)...
vdsered via All-commits
all-commits at lists.llvm.org
Tue Jun 1 05:34:24 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 13140120dcca64c35508880e10e14bcee3c54a58
https://github.com/llvm/llvm-project/commit/13140120dcca64c35508880e10e14bcee3c54a58
Author: Daniil Seredkin <vdsered at gmail.com>
Date: 2021-06-01 (Tue, 01 Jun 2021)
Changed paths:
M llvm/include/llvm/IR/Instruction.h
M llvm/lib/IR/Instruction.cpp
M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
M llvm/test/Transforms/InstCombine/fmul-exp.ll
M llvm/test/Transforms/InstCombine/fmul-exp2.ll
Log Message:
-----------
[InstCombine] Relax constraints of uses for exp(X) * exp(Y) -> exp(X + Y)
InstCombine didn't perform the transformations when fmul's operands were
the same instruction because it required to have one use for each of them
which is false in the case. This patch fixes this + adds tests for them
and introduces a new function isOnlyUserOfAnyOperand to check these cases
in a single place.
This patch is a result of discussion in D102574.
Differential Revision: https://reviews.llvm.org/D102698
More information about the All-commits
mailing list