diff options
author | Arthur Eubanks <aeubanks@google.com> | 2020-08-10 12:53:30 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2020-08-26 11:40:36 -0700 |
commit | 098d3f98276de90b6e1468031bd3858615240bb7 (patch) | |
tree | 455237e77783e05c0ca20fdabd4cf2ee1e6511dd /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 1446c1801deaf7a38221b45662f2e17fa1d5e8f0 (diff) | |
download | llvm-098d3f98276de90b6e1468031bd3858615240bb7.zip llvm-098d3f98276de90b6e1468031bd3858615240bb7.tar.gz llvm-098d3f98276de90b6e1468031bd3858615240bb7.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions