From 40c9382791e15194049c7643b56f972797a97595 Mon Sep 17 00:00:00 2001 From: SingleAccretion Date: Thu, 27 May 2021 16:29:59 +0300 Subject: [PATCH] Re-enabled optimizations for gtFoldExprConst The method has been refactored and the code that was causing problems for the optimizer no longer exists. --- src/coreclr/jit/compiler.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 2272aa126886c..eda7d0d19072d 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -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);