summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVNHoist.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-11-16 00:19:59 +0000
committerCraig Topper <craig.topper@intel.com>2017-11-16 00:19:59 +0000
commit062bcf30b19f5218a86db853966fa9b49d217076 (patch)
tree02b5e49a677df3b7b19d4794e89147598cd1fa74 /llvm/lib/Transforms/Scalar/GVNHoist.cpp
parente4572c6b733243962103b8d18ea2c3872cbef91a (diff)
downloadbcm5719-llvm-062bcf30b19f5218a86db853966fa9b49d217076.tar.gz
bcm5719-llvm-062bcf30b19f5218a86db853966fa9b49d217076.zip
[GVNHoist] Fix a signed/unsigned comparison warning that occurs in 32-bit builds with gcc.
std::distance returns ptrdiff_t which is signed. 64-bit builds don't notice because type promotion widens the unsigned first. llvm-svn: 318354
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNHoist.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVNHoist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
index e90c89c2e3a..3b551844dc2 100644
--- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -578,7 +578,7 @@ private:
// Returns true when the values are flowing out to each edge.
bool valueAnticipable(CHIArgs C, TerminatorInst *TI) const {
- if (TI->getNumSuccessors() > std::distance(C.begin(), C.end()))
+ if (TI->getNumSuccessors() > (unsigned)std::distance(C.begin(), C.end()))
return false; // Not enough args in this CHI.
for (auto CHI : C) {
OpenPOWER on IntegriCloud