Introduce a new MemTransferInst pseudo class, which is a common
parent between MemCpyInst and MemMoveInst, simplify some code to
use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 86f3256..09722d9 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -9464,7 +9464,7 @@
// If we can determine a pointer alignment that is bigger than currently
// set, update the alignment.
- if (isa<MemCpyInst>(MI) || isa<MemMoveInst>(MI)) {
+ if (isa<MemTransferInst>(MI)) {
if (Instruction *I = SimplifyMemTransfer(MI))
return I;
} else if (MemSetInst *MSI = dyn_cast<MemSetInst>(MI)) {