[GVNSink] Simplify code. NFC.

This commit is contained in:
Benjamin Kramer 2020-04-01 13:12:46 +02:00
parent f25a1b4f58
commit 66b9f5f7f0
1 changed files with 2 additions and 6 deletions

View File

@ -360,12 +360,8 @@ public:
setOpcode(I->getOpcode());
setType(I->getType());
if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(I)) {
ArrayRef<int> OrigMask = SVI->getShuffleMask();
int *Mask = A.Allocate<int>(OrigMask.size());
llvm::copy(OrigMask, Mask);
ShuffleMask = ArrayRef<int>(Mask, OrigMask.size());
}
if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(I))
ShuffleMask = SVI->getShuffleMask().copy(A);
for (auto &U : I->uses())
op_push_back(U.getUser());