Skip to content

Commit f33e3d4

Browse files
authored
[AMDGPU] Fix DAG types for V_MAD_I64_I32 and V_MAD_U64_U32. NFC. (#123629)
These instructions return a 64-bit result and a 1-bit carry, unlike smul_lohi and umul_lohi which return a pair of 32-bit results. This does not appear to make any difference in practice because the DAG types are not used for anything before these nodes are converted to MachineInstrs.
1 parent c8eb865 commit f33e3d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,8 @@ void AMDGPUDAGToDAGISel::SelectMUL_LOHI(SDNode *N) {
10451045
SDValue Zero = CurDAG->getTargetConstant(0, SL, MVT::i64);
10461046
SDValue Clamp = CurDAG->getTargetConstant(0, SL, MVT::i1);
10471047
SDValue Ops[] = {N->getOperand(0), N->getOperand(1), Zero, Clamp};
1048-
SDNode *Mad = CurDAG->getMachineNode(Opc, SL, N->getVTList(), Ops);
1048+
SDNode *Mad = CurDAG->getMachineNode(
1049+
Opc, SL, CurDAG->getVTList(MVT::i64, MVT::i1), Ops);
10491050
if (!SDValue(N, 0).use_empty()) {
10501051
SDValue Sub0 = CurDAG->getTargetConstant(AMDGPU::sub0, SL, MVT::i32);
10511052
SDNode *Lo = CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, SL,

0 commit comments

Comments
 (0)