Skip to content

Commit 1dc7861

Browse files
Refactor the function
Split it into specialized variants for each operator, delete redundant code, fix up one case of wrong typing for a constant in the MUL -> SHIFT optimization. One CSE diff due to different VNs because of the typing change for the constant (int -> long). Many text diffs: "mov x3, 5" => "mov w3, 5".
1 parent c2e912c commit 1dc7861

File tree

2 files changed

+229
-207
lines changed

2 files changed

+229
-207
lines changed

src/coreclr/jit/compiler.h

+3
Original file line numberDiff line numberDiff line change
@@ -6406,6 +6406,9 @@ class Compiler
64066406
GenTree* fgOptimizeEqualityComparisonWithConst(GenTreeOp* cmp);
64076407
GenTree* fgOptimizeRelationalComparisonWithConst(GenTreeOp* cmp);
64086408
GenTree* fgOptimizeCommutativeArithmetic(GenTreeOp* tree);
6409+
GenTree* fgOptimizeAddition(GenTreeOp* add);
6410+
GenTree* fgOptimizeMultiply(GenTreeOp* mul);
6411+
GenTree* fgOptimizeBitwiseAnd(GenTreeOp* andOp);
64096412
GenTree* fgPropagateCommaThrow(GenTree* parent, GenTreeOp* commaThrow, GenTreeFlags precedingSideEffects);
64106413
GenTree* fgMorphRetInd(GenTreeUnOp* tree);
64116414
GenTree* fgMorphModToSubMulDiv(GenTreeOp* tree);

0 commit comments

Comments
 (0)