Skip to content

Commit

Permalink
Re-enabled optimizations for gtFoldExprConst (#53347)
Browse files Browse the repository at this point in the history
The method has been refactored and the code that was
causing problems for the optimizer no longer exists.
  • Loading branch information
SingleAccretion committed May 31, 2021
1 parent e41a250 commit d5cef92
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3165,18 +3165,7 @@ class Compiler
//-------------------------------------------------------------------------

GenTree* gtFoldExpr(GenTree* tree);
GenTree*
#ifdef __clang__
// TODO-Amd64-Unix: Remove this when the clang optimizer is fixed and/or the method implementation is
// refactored in a simpler code. This is a workaround for a bug in the clang-3.5 optimizer. The issue is that in
// release build the optimizer is mistyping (or just wrongly decides to use 32 bit operation for a corner case
// of MIN_LONG) the args of the (ltemp / lval2) to int (it does a 32 bit div operation instead of 64 bit) - see
// the implementation of the method in gentree.cpp. For the case of lval1 and lval2 equal to MIN_LONG
// (0x8000000000000000) this results in raising a SIGFPE. The method implementation is rather complex. Disable
// optimizations for now.
__attribute__((optnone))
#endif // __clang__
gtFoldExprConst(GenTree* tree);
GenTree* gtFoldExprConst(GenTree* tree);
GenTree* gtFoldExprSpecial(GenTree* tree);
GenTree* gtFoldBoxNullable(GenTree* tree);
GenTree* gtFoldExprCompare(GenTree* tree);
Expand Down

0 comments on commit d5cef92

Please sign in to comment.