summaryrefslogtreecommitdiff
path: root/src/jit/morph.cpp
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2018-09-05 15:58:10 -0700
committerBrian Sullivan <briansul@microsoft.com>2018-09-13 15:21:58 -0700
commita63d721496f4035fc52e54c24d02288a30c04051 (patch)
tree47117c8934a6e680a5005a3d1f476024df7fade4 /src/jit/morph.cpp
parentc179f27661d5633168067f9f706dc44938086a1e (diff)
downloadcoreclr-a63d721496f4035fc52e54c24d02288a30c04051.tar.gz
coreclr-a63d721496f4035fc52e54c24d02288a30c04051.tar.bz2
coreclr-a63d721496f4035fc52e54c24d02288a30c04051.zip
Value Number Enhancements:
Revise the exeception gernerating value number functions: VNF_OverflowEXc, VNF_CastOvf, VNF_ARithmeticExc, VNF_DivideByZeroExc and ConvertOverflowExc added support methods for VNNormalValue Extended GetVNGuncForOper to support overflow operations and additional unsigned operations: And added value number functions for - unsigned comparisons, unsigned add, sub and mul - overflow add, sub, mul New method: VMCheckAscending to validate that exception sets maintain the ascending ordfer property. New method: VMExcSetIntersection and VMExcIsSubset Changed the constant folding logic in VNForFunc to avoid folding when the operation will unconditionally throw when folded. Explicitly specialize some EvalOp<> calls Added several new method headers comments in ValueNum.cpp Clear the unsigned flag when bashing nodes into GT_COMMA or GT_NOP nodes Removed GT_NOP and GT_COMMA cases from GetVNFuncForOper Added enum VNOperKind Added support for the unsigned multiply VNFunc used on 32-bit target
Diffstat (limited to 'src/jit/morph.cpp')
-rw-r--r--src/jit/morph.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index 3eb833e06e..f04e7b25aa 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -13671,6 +13671,10 @@ DONE_MORPHING_CHILDREN:
GenTree* throwNode = op1->gtOp.gtOp1;
noway_assert(throwNode->gtType == TYP_VOID);
+ JITDUMP("Removing [%06d] GT_JTRUE as the block now unconditionally throws an exception.\n",
+ dspTreeID(tree));
+ DEBUG_DESTROY_NODE(tree);
+
return throwNode;
}
@@ -13680,13 +13684,17 @@ DONE_MORPHING_CHILDREN:
// We need to keep op1 for the side-effects. Hang it off
// a GT_COMMA node
+ JITDUMP("Keeping side-effects by bashing [%06d] GT_JTRUE into a GT_COMMA.\n", dspTreeID(tree));
+
tree->ChangeOper(GT_COMMA);
tree->gtOp.gtOp2 = op2 = gtNewNothingNode();
// Additionally since we're eliminating the JTRUE
// codegen won't like it if op1 is a RELOP of longs, floats or doubles.
// So we change it into a GT_COMMA as well.
+ JITDUMP("Also bashing [%06d] (a relop) into a GT_COMMA.\n", dspTreeID(op1));
op1->ChangeOper(GT_COMMA);
+ op1->gtFlags &= ~GTF_UNSIGNED; // Clear the unsigned flag if it was set on the relop
op1->gtType = op1->gtOp.gtOp1->gtType;
return tree;