Fix range-loop-analysis warning
authorKeith Smiley <keithbsmiley@gmail.com>
Wed, 9 Jun 2021 16:08:54 +0000 (09:08 -0700)
committerKeith Smiley <keithbsmiley@gmail.com>
Thu, 10 Jun 2021 15:39:54 +0000 (08:39 -0700)
commit026170d17d1eb8956237ba88c07a60f07445ebf1
tree580bb8ff5425fa6691693576efbf6326376ff0b0
parent428a62f65f16f1640b1bfe033d20e6a4f545dd3e
Fix range-loop-analysis warning

```
llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8024:19: warning: loop variable 'VF' of type 'const llvm::ElementCount' creates a copy from type 'const llvm::ElementCount' [-Wrange-loop-analysis]
  for (const auto VF : VFCandidates) {
                  ^
llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8024:8: note: use reference type 'const llvm::ElementCount &' to prevent copying
  for (const auto VF : VFCandidates) {
       ^~~~~~~~~~~~~~~
                  &
1 warning generated.
```

Differential Revision: https://reviews.llvm.org/D103970
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp