Skip to content

Commit 5dcff45

Browse files
code clean up
1 parent 6547337 commit 5dcff45

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,14 +2270,13 @@ bool SPIRVInstructionSelector::selectDot4AddPackedExpansion(
22702270
.constrainAllUses(TII, TRI, RBI);
22712271

22722272
// A[i] * B[i]
2273-
Result &= BuildMI(BB, I, I.getDebugLoc(), TII.get(ExtractOp))
2274-
.addDef(MaskMul)
2273+
Register Mul = MRI->createVirtualRegister(&SPIRV::IDRegClass);
2274+
Result &= BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpIMulS))
2275+
.addDef(Mul)
22752276
.addUse(GR.getSPIRVTypeID(ResType))
22762277
.addUse(Mul)
2277-
.addUse(GR.getOrCreateConstInt(APInt(8, 0), I, EltType, TII,
2278-
ZeroAsNull))
2279-
.addUse(GR.getOrCreateConstInt(APInt(8, 8), I, EltType, TII,
2280-
ZeroAsNull))
2278+
.addUse(AElt)
2279+
.addUse(BElt)
22812280
.constrainAllUses(TII, TRI, RBI);
22822281

22832282
// Discard 24 highest-bits so that stored i32 register is i8 equivalent

0 commit comments

Comments
 (0)