[all-commits] [llvm/llvm-project] 098d3f: [InstSimplify] Simplify to vector constants when p...
aeubanks via All-commits
all-commits at lists.llvm.org
Wed Aug 26 11:42:06 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 098d3f98276de90b6e1468031bd3858615240bb7
https://github.com/llvm/llvm-project/commit/098d3f98276de90b6e1468031bd3858615240bb7
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2020-08-26 (Wed, 26 Aug 2020)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Analysis/ConstantFolding/vscale-shufflevector.ll
M llvm/test/Transforms/InstSimplify/vscale.ll
Log Message:
-----------
[InstSimplify] Simplify to vector constants when possible
InstSimplify should do all transformations that ConstProp does, but
one thing that ConstProp does that InstSimplify wouldn't is inline
vector instructions that are constants, e.g. into a ret.
Previously vector instructions wouldn't be inlined in InstSimplify
because llvm::Simplify*Instruction() would return nullptr for specific
instructions, such as vector instructions that were actually constants,
if it couldn't simplify them.
This changes SimplifyInsertElementInst, SimplifyExtractElementInst, and
SimplifyShuffleVectorInst to return a vector constant when possible.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D85946
More information about the All-commits
mailing list