[all-commits] [llvm/llvm-project] 3638bd: [ConstantFold] Handle undef/poison when constant f...
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Fri Mar 12 00:11:10 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3638bdfbda01e5a4f17c330edc602e413359c722
https://github.com/llvm/llvm-project/commit/3638bdfbda01e5a4f17c330edc602e413359c722
Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2021-03-12 (Fri, 12 Mar 2021)
Changed paths:
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/test/Transforms/InstSimplify/ConstProp/smul-fix-sat.ll
M llvm/test/Transforms/InstSimplify/ConstProp/smul-fix.ll
Log Message:
-----------
[ConstantFold] Handle undef/poison when constant folding smul_fix/smul_fix_sat
Do constant folding according to
posion * C -> poison
C * poison -> poison
undef * C -> 0
C * undef -> 0
for smul_fix and smul_fix_sat intrinsics (for any scale).
Reviewed By: nikic, aqjune, nagisa
Differential Revision: https://reviews.llvm.org/D98410
Commit: 529c8e8dc6e9826b298b5e8586d55940abfee0ba
https://github.com/llvm/llvm-project/commit/529c8e8dc6e9826b298b5e8586d55940abfee0ba
Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2021-03-12 (Fri, 12 Mar 2021)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
A llvm/test/Transforms/InstSimplify/smul_fix.ll
Log Message:
-----------
[InstSimplify] Simplify smul.fix and smul.fix.sat
Add simplification of smul.fix and smul.fix.sat according to
X * 0 -> 0
X * undef -> 0
X * (1 << scale) -> X
This includes the commuted patterns and splatted vectors.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D98299
Compare: https://github.com/llvm/llvm-project/compare/849f8183fb99...529c8e8dc6e9
More information about the All-commits
mailing list