From a9cc14d8da337e1ea563b6651d60ebc9fc046c77 Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Wed, 8 May 2024 13:28:31 +0200 Subject: [PATCH] Fold nullchecks in Interlocked.* (#101956) --- src/coreclr/jit/earlyprop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/earlyprop.cpp b/src/coreclr/jit/earlyprop.cpp index ef03524a1810c0..ca57a44e7288f7 100644 --- a/src/coreclr/jit/earlyprop.cpp +++ b/src/coreclr/jit/earlyprop.cpp @@ -511,7 +511,7 @@ GenTree* Compiler::optFindNullCheckToFold(GenTree* tree, LocalNumberToNullCheckT { assert(tree->OperIsIndirOrArrMetaData()); - GenTree* addr = tree->GetIndirOrArrMetaDataAddr(); + GenTree* addr = tree->GetIndirOrArrMetaDataAddr()->gtEffectiveVal(); ssize_t offsetValue = 0;