# Changeset View

Changeset View

# Standalone View

Standalone View

# llvm/include/llvm/Target/TargetSelectionDAG.td

Show First 20 Lines • Show All 374 Lines • ▼ Show 20 Line(s) | 374 | def umin : SDNode<"ISD::UMIN" , SDTIntBinOp, | |||
---|---|---|---|---|---|

375 | [SDNPCommutative, SDNPAssociative]>; | 375 | [SDNPCommutative, SDNPAssociative]>; | ||

376 | def umax : SDNode<"ISD::UMAX" , SDTIntBinOp, | 376 | def umax : SDNode<"ISD::UMAX" , SDTIntBinOp, | ||

377 | [SDNPCommutative, SDNPAssociative]>; | 377 | [SDNPCommutative, SDNPAssociative]>; | ||

378 | 378 | | |||

379 | def saddsat : SDNode<"ISD::SADDSAT" , SDTIntBinOp, [SDNPCommutative]>; | 379 | def saddsat : SDNode<"ISD::SADDSAT" , SDTIntBinOp, [SDNPCommutative]>; | ||

380 | def uaddsat : SDNode<"ISD::UADDSAT" , SDTIntBinOp, [SDNPCommutative]>; | 380 | def uaddsat : SDNode<"ISD::UADDSAT" , SDTIntBinOp, [SDNPCommutative]>; | ||

381 | def ssubsat : SDNode<"ISD::SSUBSAT" , SDTIntBinOp>; | 381 | def ssubsat : SDNode<"ISD::SSUBSAT" , SDTIntBinOp>; | ||

382 | def usubsat : SDNode<"ISD::USUBSAT" , SDTIntBinOp>; | 382 | def usubsat : SDNode<"ISD::USUBSAT" , SDTIntBinOp>; | ||

383 | def smulfix : SDNode<"ISD::SMULFIX" , SDTIntBinOp, [SDNPCommutative]>; | ||||

ebevhan: It's marked SDTIntBinOp, but is supposed to have three input operands. I think these nodes… | |||||

craig.topperUnsubmitted Done ReplyTablegen should use the first two operands as the commutative ones. It used to be an error or an assertion. But I changed it sometime in the last year or so to make it work for FMA in X86. craig.topper: Tablegen should use the first two operands as the commutative ones. It used to be an error or… | |||||

383 | 384 | | |||

384 | def sext_inreg : SDNode<"ISD::SIGN_EXTEND_INREG", SDTExtInreg>; | 385 | def sext_inreg : SDNode<"ISD::SIGN_EXTEND_INREG", SDTExtInreg>; | ||

385 | def sext_invec : SDNode<"ISD::SIGN_EXTEND_VECTOR_INREG", SDTExtInvec>; | 386 | def sext_invec : SDNode<"ISD::SIGN_EXTEND_VECTOR_INREG", SDTExtInvec>; | ||

386 | def zext_invec : SDNode<"ISD::ZERO_EXTEND_VECTOR_INREG", SDTExtInvec>; | 387 | def zext_invec : SDNode<"ISD::ZERO_EXTEND_VECTOR_INREG", SDTExtInvec>; | ||

387 | 388 | | |||

388 | def abs : SDNode<"ISD::ABS" , SDTIntUnaryOp>; | 389 | def abs : SDNode<"ISD::ABS" , SDTIntUnaryOp>; | ||

389 | def bitreverse : SDNode<"ISD::BITREVERSE" , SDTIntUnaryOp>; | 390 | def bitreverse : SDNode<"ISD::BITREVERSE" , SDTIntUnaryOp>; | ||

390 | def bswap : SDNode<"ISD::BSWAP" , SDTIntUnaryOp>; | 391 | def bswap : SDNode<"ISD::BSWAP" , SDTIntUnaryOp>; | ||

▲ Show 20 Lines • Show All 954 Lines • Show Last 20 Lines |

It's marked SDTIntBinOp, but is supposed to have three input operands. I think these nodes might need a new SDT.

Also, multiplication is obviously commutative, but I don't know if SDNPCommutative works on nodes that have anything except two operands. It might not have an effect at all. Someone who knows more about DAG might have more info on that.