summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/intrinsic-struct.td
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-12-20 19:36:28 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-12-20 19:36:28 +0000
commit303327d58bc1d115cfa81d632dfa443b20bec366 (patch)
treee6f1f484d723ccca6ac8ec689b3c941b0573016a /llvm/test/TableGen/intrinsic-struct.td
parenta40ce7bc3616d54f85d53dbb4c19b73d46068291 (diff)
downloadbcm5719-llvm-303327d58bc1d115cfa81d632dfa443b20bec366.tar.gz
bcm5719-llvm-303327d58bc1d115cfa81d632dfa443b20bec366.zip
TableGen: Allow setting SDNodeProperties on intrinsics
Allows preserving MachineMemOperands on intrinsics through selection. For reasons I don't understand, this is a static property of the pattern and the selector deliberately goes out of its way to drop if not present. Intrinsics already inherit from SDPatternOperator allowing them to be used directly in instruction patterns. SDPatternOperator has a list of SDNodeProperty, but you currently can't set them on the intrinsic. Without SDNPMemOperand, when the node is selected any memory operands are always dropped. Allowing setting this on the intrinsics avoids needing to introduce another equivalent target node just to have SDNPMemOperand set. llvm-svn: 321212
Diffstat (limited to 'llvm/test/TableGen/intrinsic-struct.td')
-rw-r--r--llvm/test/TableGen/intrinsic-struct.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/test/TableGen/intrinsic-struct.td b/llvm/test/TableGen/intrinsic-struct.td
index 93737b14db2..1f1a8c2c822 100644
--- a/llvm/test/TableGen/intrinsic-struct.td
+++ b/llvm/test/TableGen/intrinsic-struct.td
@@ -2,6 +2,7 @@
// XFAIL: vg_leak
class IntrinsicProperty;
+class SDNodeProperty;
class ValueType<int size, int value> {
string Namespace = "MVT";
@@ -20,6 +21,7 @@ class Intrinsic<string name, list<LLVMType> ret_types = []> {
list<LLVMType> RetTypes = ret_types;
list<LLVMType> ParamTypes = [];
list<IntrinsicProperty> IntrProperties = [];
+ list<SDNodeProperty> Properties = [];
}
def iAny : ValueType<0, 253>;
OpenPOWER on IntegriCloud