summaryrefslogtreecommitdiff
path: root/src/jit/gentree.cpp
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2017-09-27 17:28:42 -0700
committerGitHub <noreply@github.com>2017-09-27 17:28:42 -0700
commit00bce3384795a4f6fc56f5fa9a0bbdac3c1e892f (patch)
tree38a95dc57b48dd1b886272c08c25f54353872b03 /src/jit/gentree.cpp
parentd113b5fd56d49ff7ed3cb9b34cc122676026d240 (diff)
parent932b8b5cdd0fda242dfd183599a7e022bc2b66e3 (diff)
downloadcoreclr-00bce3384795a4f6fc56f5fa9a0bbdac3c1e892f.tar.gz
coreclr-00bce3384795a4f6fc56f5fa9a0bbdac3c1e892f.tar.bz2
coreclr-00bce3384795a4f6fc56f5fa9a0bbdac3c1e892f.zip
Merge pull request #14192 from sdmaclea/PR-ARM64-JCMP
[Arm64] Add GT_JCMP node
Diffstat (limited to 'src/jit/gentree.cpp')
-rw-r--r--src/jit/gentree.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index f53981b98e..0fd77cdc69 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -2551,6 +2551,15 @@ GenTreePtr Compiler::gtReverseCond(GenTree* tree)
GenTreeCC* cc = tree->AsCC();
cc->gtCondition = GenTree::ReverseRelop(cc->gtCondition);
}
+ else if (tree->OperIs(GT_JCMP))
+ {
+ // Flip the GTF_JCMP_EQ
+ //
+ // This causes switching
+ // cbz <=> cbnz
+ // tbz <=> tbnz
+ tree->gtFlags ^= GTF_JCMP_EQ;
+ }
else
{
tree = gtNewOperNode(GT_NOT, TYP_INT, tree);
@@ -9884,6 +9893,11 @@ void Compiler::gtDispNode(GenTreePtr tree, IndentStack* indentStack, __in __in_z
}
goto DASH;
+ case GT_JCMP:
+ printf((tree->gtFlags & GTF_JCMP_TST) ? "T" : "C");
+ printf((tree->gtFlags & GTF_JCMP_EQ) ? "EQ" : "NE");
+ goto DASH;
+
default:
DASH:
printf("-");
@@ -10796,6 +10810,9 @@ void Compiler::gtDispLeaf(GenTree* tree, IndentStack* indentStack)
case GT_SETCC:
printf(" cond=%s", GenTree::OpName(tree->AsCC()->gtCondition));
break;
+ case GT_JCMP:
+ printf(" cond=%s%s", (tree->gtFlags & GTF_JCMP_TST) ? "TEST_" : "",
+ (tree->gtFlags & GTF_JCMP_EQ) ? "EQ" : "NE");
default:
assert(!"don't know how to display tree leaf node");