Skip to content

Commit 207924d

Browse files
committed
Avoid unnecessary type conversion
The CreateShuffleVector API only accepts `int` or `uint32_t` ArrayRef mask arguments.
1 parent d6404ce commit 207924d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SPIRV/SPIRVReader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,11 +1984,11 @@ Value *SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *BV, Function *F,
19841984
}
19851985

19861986
case 4: {
1987-
for (unsigned Idx = 0; Idx < 4; ++Idx) {
1987+
for (int Idx = 0; Idx < 4; ++Idx) {
19881988
Value *V1 = Builder.CreateShuffleVector(
1989-
MCache[0], MCache[1], ArrayRef<unsigned int>{Idx, Idx + 4});
1989+
MCache[0], MCache[1], ArrayRef<int>{Idx, Idx + 4});
19901990
Value *V2 = Builder.CreateShuffleVector(
1991-
MCache[2], MCache[3], ArrayRef<unsigned int>{Idx, Idx + 4});
1991+
MCache[2], MCache[3], ArrayRef<int>{Idx, Idx + 4});
19921992
Value *V3 =
19931993
Builder.CreateShuffleVector(V1, V2, ArrayRef<int>{0, 1, 2, 3});
19941994
V = Builder.CreateInsertValue(V, V3, Idx);

0 commit comments

Comments
 (0)