summaryrefslogtreecommitdiff
path: root/src/jit/gentree.h
diff options
context:
space:
mode:
authorTanner Gooding <tagoo@outlook.com>2018-03-07 12:15:31 -0800
committerTanner Gooding <tagoo@outlook.com>2018-03-08 08:35:05 -0800
commit530949b14c795988dd81bae603ca33a87d6ee5fd (patch)
treeed2c91249425fb6b15cfccff1e60ef0badf36a10 /src/jit/gentree.h
parent5e03df42d9fb2fe05a4246695128ddfb6e9ca7fd (diff)
downloadcoreclr-530949b14c795988dd81bae603ca33a87d6ee5fd.tar.gz
coreclr-530949b14c795988dd81bae603ca33a87d6ee5fd.tar.bz2
coreclr-530949b14c795988dd81bae603ca33a87d6ee5fd.zip
Updating isRMWRegOper, OperIsCommutative, and canBeContained to handle HWIntrinsic nodes
Diffstat (limited to 'src/jit/gentree.h')
-rw-r--r--src/jit/gentree.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 25d5a286fd..35c215cf21 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -1471,6 +1471,27 @@ public:
}
#endif // FEATURE_SIMD
+#ifdef FEATURE_HW_INTRINSICS
+ bool isCommutativeHWIntrinsic() const;
+ bool isContainableHWIntrinsic() const;
+ bool isRMWHWIntrinsic(Compiler* comp);
+#else
+ bool isCommutativeHWIntrinsic() const
+ {
+ return false;
+ }
+
+ bool isContainableHWIntrinsic() const
+ {
+ return false;
+ }
+
+ bool isRMWHWIntrinsic(Compiler* comp)
+ {
+ return false;
+ }
+#endif // FEATURE_HW_INTRINSICS
+
static bool OperIsCommutative(genTreeOps gtOper)
{
return (OperKind(gtOper) & GTK_COMMUTE) != 0;
@@ -1478,7 +1499,8 @@ public:
bool OperIsCommutative()
{
- return OperIsCommutative(gtOper) || (OperIsSIMD(gtOper) && isCommutativeSIMDIntrinsic());
+ return OperIsCommutative(gtOper) || (OperIsSIMD(gtOper) && isCommutativeSIMDIntrinsic()) ||
+ (OperIsHWIntrinsic(gtOper) && isCommutativeHWIntrinsic());
}
static bool OperIsAssignment(genTreeOps gtOper)