summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorFrits van Bommel <fvbommel@gmail.com>2011-07-25 15:13:01 +0000
committerFrits van Bommel <fvbommel@gmail.com>2011-07-25 15:13:01 +0000
commit2eb40f6d86ab44e7e642ea665afb28604008d367 (patch)
treeb5714f977ff8b5a663cb2486fe23cfc1487da14f /lib/Transforms/InstCombine
parentddfb69cd47b6062bde9d6a0ac1576ad8ddcb5a9e (diff)
downloadllvm-2eb40f6d86ab44e7e642ea665afb28604008d367.tar.gz
llvm-2eb40f6d86ab44e7e642ea665afb28604008d367.tar.bz2
llvm-2eb40f6d86ab44e7e642ea665afb28604008d367.tar.xz
Shorten some expressions by using ArrayRef::slice().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstCombinePHI.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombinePHI.cpp b/lib/Transforms/InstCombine/InstCombinePHI.cpp
index b8da4054a4..e82b0d2ab3 100644
--- a/lib/Transforms/InstCombine/InstCombinePHI.cpp
+++ b/lib/Transforms/InstCombine/InstCombinePHI.cpp
@@ -229,8 +229,7 @@ Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) {
Value *Base = FixedOperands[0];
GetElementPtrInst *NewGEP =
- GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands.begin() + 1,
- FixedOperands.end()));
+ GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands).slice(1));
if (AllInBounds) NewGEP->setIsInBounds();
NewGEP->setDebugLoc(FirstInst->getDebugLoc());
return NewGEP;