[PATCH] D51751: Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 13:00:59 PDT 2018
efriedma added a comment.
Missing test coverage for half.
Missing test coverage here for ConstantStruct/ConstantArray/ConstantVector, although I guess the array/struct bits are covered by the clang patch. I'd like to see some coverage for vectors with unusual element sizes, though, like `<i1 x 16>`.
================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:757-758
if (Value *ByteVal = isBytewiseValue(V)) {
- if (Instruction *I = tryMergingIntoMemset(SI, SI->getPointerOperand(),
- ByteVal)) {
+ if (Instruction *I =
+ tryMergingIntoMemset(SI, SI->getPointerOperand(), ByteVal)) {
BBI = I->getIterator(); // Don't invalidate iterator.
----------------
Unnecessary change.
================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:796
+ Value *ByteVal = MSI->getValue();
+ if (Instruction *I = tryMergingIntoMemset(MSI, MSI->getDest(), ByteVal)) {
BBI = I->getIterator(); // Don't invalidate iterator.
----------------
Unnecessary change.
Repository:
rL LLVM
https://reviews.llvm.org/D51751
More information about the llvm-commits
mailing list