[LLVMdev] Intrinsic's "Commutative" property

Duncan Sands baldrick at free.fr
Wed Jul 25 00:34:13 PDT 2012


Hi Simon,

> What does it mean when "Commutative" property is applied to an
> intrinsic with more than two arguments? For example,
> __builtin_ia32_dppd has this property.

good question!  I don't know what it means, however it seems to be used as
follows: CodeGenIntrinsic::CodeGenIntrinsic reads "Commutative" and sets the
isCommutative flag in an object of type struct CodeGenIntrinsic.  At a glance
this only seems to be used in TreePatternNode::canPatternMatch.  That rejects
any patterns that have an immediate anywhere except as the last operand.

Ciao, Duncan.



More information about the llvm-dev mailing list