Do not Constant-Prop immediate values that require relocation on ARM32
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Wed, 29 Aug 2018 01:24:22 +0000 (18:24 -0700)
committerEgor Chesakov <Egor.Chesakov@microsoft.com>
Wed, 29 Aug 2018 01:25:20 +0000 (18:25 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/bd32cdb5ae1e581d8b9aaceaae97075f675abf7d

src/coreclr/src/jit/assertionprop.cpp

index b34e5203ec48e85b3fc53a421230615e67302e3a..5e00ef9a9e6a12f9ee7accf81596850b0202f579 100644 (file)
@@ -1109,6 +1109,11 @@ AssertionIndex Compiler::optCreateAssertion(GenTree*         op1,
                     if (op2->gtOper == GT_CNS_INT)
                     {
 #ifdef _TARGET_ARM_
+                        // Do not Constant-Prop immediate values that require relocation
+                        if (op2->gtIntCon.ImmedValNeedsReloc(this))
+                        {
+                            goto DONE_ASSERTION;
+                        }
                         // Do not Constant-Prop large constants for ARM
                         if (!codeGen->validImmForMov(op2->gtIntCon.gtIconVal))
                         {