summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-04-01 17:02:06 +0000
committerHal Finkel <hfinkel@anl.gov>2013-04-01 17:02:06 +0000
commita1f4290ac94f34173e3561c717390de07dccc646 (patch)
treed74dca31880d322a64c1cc2124f64cdf9f4e3ab6 /lib/Target/PowerPC/PPCRegisterInfo.cpp
parentdc8efbae143626074fbb2420dde357d16e17bf57 (diff)
downloadllvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.gz
llvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.bz2
llvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.xz
Use ImmToIdxMap.count in PPCRegisterInfo
Code improvement suggested by Jakob (in review of r178450). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index c323186876..1d61a3a8ea 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -528,8 +528,7 @@ PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
// If the instruction is not present in ImmToIdxMap, then it has no immediate
// form (and must be r+r).
- bool noImmForm = !MI.isInlineAsm() &&
- (ImmToIdxMap.find(OpC) == ImmToIdxMap.end());
+ bool noImmForm = !MI.isInlineAsm() && !ImmToIdxMap.count(OpC);
// Now add the frame object offset to the offset from r1.
int Offset = MFI->getObjectOffset(FrameIndex);