Skip to content

Commit

Permalink
Enable one opt outside global morph
Browse files Browse the repository at this point in the history
No reason not to. Just a few diffs.
  • Loading branch information
SingleAccretion committed Jan 28, 2022
1 parent c35e310 commit 6a8543e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13550,9 +13550,8 @@ GenTree* Compiler::fgOptimizeAddition(GenTreeOp* add)
return op1;
}

// TODO-CQ: this transform preserves VNs and can be enabled outside global morph.
// Note that these transformations are legal for floating-point ADDs as well.
if (opts.OptimizationEnabled() && fgGlobalMorph)
if (opts.OptimizationEnabled())
{
// - a + b = > b - a
// ADD((NEG(a), b) => SUB(b, a)
Expand Down

0 comments on commit 6a8543e

Please sign in to comment.