summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitede0dc6ddac97dbfe6936006d6059083aa8a9b68 (patch)
treec719e124e228d2214e026c8b397705ab487d101c /llvm/lib/Transforms/InstCombine
parentb226908bea12ea81983e771c8a29d1bad7e9aca4 (diff)
downloadbcm5719-llvm-ede0dc6ddac97dbfe6936006d6059083aa8a9b68.tar.gz
bcm5719-llvm-ede0dc6ddac97dbfe6936006d6059083aa8a9b68.zip
Shorten some expressions by using ArrayRef::slice().
llvm-svn: 135910
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
index b8da4054a44..e82b0d2ab30 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud