Commit 89e919f
authored
Fix warnings while compiling SLPVectorizer.cpp (llvm#118051)
Towards llvm#118048
I was building llvm (clang and lld) for webassembly and came across
these warnings. Not sure if they are seen in our builds too.
```
/Users/anutosh491/work/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6924:67: warning: comparison of integers of different signs: 'typename iterator_traits<user_iterator_impl<User>>::difference_type' (aka 'long') and 'unsigned int' [-Wsign-compare]
6924 | if (std::distance(LI->user_begin(), LI->user_end()) !=
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
6925 | LI->getNumUses())
| ~~~~~~~~~~~~~~~~
[ 79%] Building CXX object lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
/Users/anutosh491/work/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9754:43: warning: comparison of integers of different signs: 'typename iterator_traits<Value *const *>::difference_type' (aka 'long') and 'unsigned int' [-Wsign-compare]
9754 | count(Slice, Slice.front()) ==
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
9755 | (isa<UndefValue>(Slice.front()) ? VF - 1 : 1)) {
```
This PR tries to address those warnings.1 parent 452efb3 commit 89e919f
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6922 | 6922 | | |
6923 | 6923 | | |
6924 | 6924 | | |
6925 | | - | |
6926 | | - | |
| 6925 | + | |
| 6926 | + | |
6927 | 6927 | | |
6928 | 6928 | | |
6929 | 6929 | | |
| |||
9716 | 9716 | | |
9717 | 9717 | | |
9718 | 9718 | | |
9719 | | - | |
| 9719 | + | |
| 9720 | + | |
9720 | 9721 | | |
9721 | 9722 | | |
9722 | 9723 | | |
| |||
0 commit comments