Skip to content

Commit e805946

Browse files
committed
[RISCV] Fix -Wsign-compare warning from f8ee58a
lib/Target/RISCV/RISCVISelLowering.cpp:4629:26: error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare] 4629 | for (unsigned i = 0; i != NumElts; ++i) { | ~ ^ ~~~~~~~ 1 error generated.
1 parent f8ee58a commit e805946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4626,7 +4626,7 @@ static bool isElementRotate(const std::array<std::pair<int, int>, 2> &SrcInfo,
46264626
static bool isAlternating(const std::array<std::pair<int, int>, 2> &SrcInfo,
46274627
ArrayRef<int> Mask, bool RequiredPolarity) {
46284628
int NumElts = Mask.size();
4629-
for (unsigned i = 0; i != NumElts; ++i) {
4629+
for (int i = 0; i != NumElts; ++i) {
46304630
int M = Mask[i];
46314631
if (M < 0)
46324632
continue;

0 commit comments

Comments
 (0)