Skip to content

Commit aa5dc53

Browse files
authored
[X86] Fix the type of X86ISD::UMUL (llvm#117377)
Same as SMUL, UMUL produces one result + flags, not two results + flags.
1 parent 9edbe56 commit aa5dc53

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

llvm/lib/Target/X86/X86InstrFragments.td

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ def SDTBinaryArithWithFlagsInOut : SDTypeProfile<2, 3,
4545
SDTCisInt<0>,
4646
SDTCisVT<1, i32>,
4747
SDTCisVT<4, i32>]>;
48-
// RES1, RES2, FLAGS = op LHS, RHS
49-
def SDT2ResultBinaryArithWithFlags : SDTypeProfile<3, 2,
50-
[SDTCisSameAs<0, 1>,
51-
SDTCisSameAs<0, 2>,
52-
SDTCisSameAs<0, 3>,
53-
SDTCisInt<0>, SDTCisVT<1, i32>]>;
48+
5449
def SDTX86BrCond : SDTypeProfile<0, 3,
5550
[SDTCisVT<0, OtherVT>,
5651
SDTCisVT<1, i8>, SDTCisVT<2, i32>]>;
@@ -266,7 +261,7 @@ def X86add_flag : SDNode<"X86ISD::ADD", SDTBinaryArithWithFlags,
266261
def X86sub_flag : SDNode<"X86ISD::SUB", SDTBinaryArithWithFlags>;
267262
def X86smul_flag : SDNode<"X86ISD::SMUL", SDTBinaryArithWithFlags,
268263
[SDNPCommutative]>;
269-
def X86umul_flag : SDNode<"X86ISD::UMUL", SDT2ResultBinaryArithWithFlags,
264+
def X86umul_flag : SDNode<"X86ISD::UMUL", SDTBinaryArithWithFlags,
270265
[SDNPCommutative]>;
271266
def X86adc_flag : SDNode<"X86ISD::ADC", SDTBinaryArithWithFlagsInOut>;
272267
def X86sbb_flag : SDNode<"X86ISD::SBB", SDTBinaryArithWithFlagsInOut>;

0 commit comments

Comments
 (0)