Skip to content

Commit 4fda952

Browse files
PiotrFusiksys_zuul
authored andcommitted
Avoid assertion from Emu64Ops.
Change-Id: I4f588bf1d96959e63436d5df59c8dfcda745dd93
1 parent a453f7d commit 4fda952

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

IGC/Compiler/CISACodeGen/Emu64OpsPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,7 @@ bool InstExpander::visitExtractElement(ExtractElementInst& EEI) {
20592059
V = IRB->CreateBitCast(V, Emu->getV2Int32Ty(NumElts));
20602060
// Re-calculate indices to Lo and Hi parts.
20612061
Value* Idx = EEI.getIndexOperand();
2062+
Idx = IRB->CreateZExt(Idx, IRB->getInt32Ty());
20622063
Idx = IRB->CreateMul(Idx, IRB->getInt32(2));
20632064
Value* IdxLo = IRB->CreateAdd(Idx, IRB->getInt32(0));
20642065
Value* IdxHi = IRB->CreateAdd(Idx, IRB->getInt32(1));

0 commit comments

Comments
 (0)