aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-08-02 13:32:27 -0700
committerKarl Schimpf <kschimpf@google.com>2013-08-02 13:32:27 -0700
commit39bd1f66ebd83185944cf08903d8abf80321c17d (patch)
treef24f67d037a3f3a989b822f9413bcf1e5ef56c86 /lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
parent0fdd44084de8589343b099a4d1908f221e7bdc37 (diff)
Remove unnecessary pointer casts on store instructions.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/21964002
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
index 11e1161bf8..34f4f2bbe9 100644
--- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
@@ -443,7 +443,12 @@ static bool AllowsNormalizedPtr(const Value *V, const Instruction *Arg) {
default:
return false;
case Instruction::Load:
+ // Verify it is the ptr argument of the load. Note: This check is
+ // not really necessary in that a load only has one argument.
return I->getOperand(0) == Arg;
+ case Instruction::Store:
+ // Verify it is the ptr argument of the store.
+ return I->getOperand(1) == Arg;
}
}