diff --git a/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorOptimizationInfoPopulator.java b/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorOptimizationInfoPopulator.java
index be9d7c5..f18dc04 100644
--- a/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorOptimizationInfoPopulator.java
+++ b/src/main/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagatorOptimizationInfoPopulator.java
@@ -142,7 +142,18 @@
     } else if (fieldType.isClassType()) {
       ConcreteClassTypeValueState classState = state.asClassState();
       setAbstractValue(field, classState.getAbstractValue(appView));
-      setDynamicType(field, classState.getDynamicType());
+
+      DynamicTypeWithUpperBound existingDynamicType =
+          field.getOptimizationInfo().getDynamicType().asDynamicTypeWithUpperBound();
+      DynamicType computedDynamicType = classState.getDynamicType();
+      if (existingDynamicType == null
+          || existingDynamicType.isUnknown()
+          || (computedDynamicType.isDynamicTypeWithUpperBound()
+              && computedDynamicType
+                  .asDynamicTypeWithUpperBound()
+                  .strictlyLessThan(existingDynamicType, appView))) {
+        setDynamicType(field, computedDynamicType);
+      }
     } else {
       assert fieldType.isPrimitiveType();
       ConcretePrimitiveTypeValueState primitiveState = state.asPrimitiveState();
diff --git a/src/main/java/com/android/tools/r8/shaking/RootSetUtils.java b/src/main/java/com/android/tools/r8/shaking/RootSetUtils.java
index de54647..27e13b0 100644
--- a/src/main/java/com/android/tools/r8/shaking/RootSetUtils.java
+++ b/src/main/java/com/android/tools/r8/shaking/RootSetUtils.java
@@ -218,6 +218,9 @@
         DexClass clazz,
         ProguardConfigurationRule rule,
         ProguardIfRulePreconditionMatch ifRulePreconditionMatch) {
+      if (!satisfyNonSyntheticClass(clazz, appView)) {
+        return;
+      }
       if (!satisfyClassType(rule, clazz)) {
         return;
       }
@@ -864,6 +867,11 @@
       out.close();
     }
 
+    static boolean satisfyNonSyntheticClass(DexClass clazz, AppView<?> appView) {
+      return !clazz.isProgramClass()
+          || !appView.getSyntheticItems().isSynthetic(clazz.asProgramClass());
+    }
+
     static boolean satisfyClassType(ProguardConfigurationRule rule, DexClass clazz) {
       return rule.getClassType().matches(clazz) != rule.getClassTypeNegated();
     }
diff --git a/src/test/examplesJava17/records/EmptyRecordAnnotationTest.java b/src/test/examplesJava17/records/EmptyRecordAnnotationTest.java
index 1759f97..691b91c 100644
--- a/src/test/examplesJava17/records/EmptyRecordAnnotationTest.java
+++ b/src/test/examplesJava17/records/EmptyRecordAnnotationTest.java
@@ -10,28 +10,25 @@
 import com.android.tools.r8.TestParametersCollection;
 import com.android.tools.r8.TestRuntime.CfVm;
 import com.android.tools.r8.utils.StringUtils;
+import com.android.tools.r8.utils.codeinspector.ClassSubject;
+import com.android.tools.r8.utils.codeinspector.CodeInspector;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(Parameterized.class)
 public class EmptyRecordAnnotationTest extends TestBase {
 
-  private static final String EXPECTED_RESULT_NATIVE_OR_PARTIALLY_DESUGARED_RECORD =
-      StringUtils.lines("class java.lang.Record", "class records.EmptyRecordAnnotationTest$Empty");
-  private static final String EXPECTED_RESULT_DESUGARED_RECORD =
-      StringUtils.lines(
-          "class com.android.tools.r8.RecordTag", "class records.EmptyRecordAnnotationTest$Empty");
-
   private final TestParameters parameters;
 
   public EmptyRecordAnnotationTest(TestParameters parameters) {
     this.parameters = parameters;
   }
 
-  @Parameterized.Parameters(name = "{0}")
+  @Parameters(name = "{0}")
   public static TestParametersCollection data() {
     return getTestParameters()
         .withCfRuntimesStartingFromIncluding(CfVm.JDK17)
@@ -46,7 +43,7 @@
     testForJvm(parameters)
         .addInnerClassesAndStrippedOuter(getClass())
         .run(parameters.getRuntime(), TestClass.class)
-        .assertSuccessWithOutput(EXPECTED_RESULT_NATIVE_OR_PARTIALLY_DESUGARED_RECORD);
+        .apply(rr -> rr.assertSuccessWithOutput(getExpectedOutput(rr.inspector(), false, false)));
   }
 
   @Test
@@ -57,10 +54,11 @@
         .setMinApi(parameters)
         .compile()
         .run(parameters.getRuntime(), TestClass.class)
-        .applyIf(
-            isRecordsFullyDesugaredForD8(parameters),
-            r -> r.assertSuccessWithOutput(EXPECTED_RESULT_DESUGARED_RECORD),
-            r -> r.assertSuccessWithOutput(EXPECTED_RESULT_NATIVE_OR_PARTIALLY_DESUGARED_RECORD));
+        .apply(
+            rr ->
+                rr.assertSuccessWithOutput(
+                    getExpectedOutput(
+                        rr.inspector(), isRecordsFullyDesugaredForD8(parameters), true)));
   }
 
   @Test
@@ -74,17 +72,32 @@
         .addKeepRules("-keepattributes *Annotation*")
         .addKeepRules("-keep class records.EmptyRecordAnnotationTest$Empty")
         .addKeepMainRule(TestClass.class)
-        // This is used to avoid renaming com.android.tools.r8.RecordTag.
-        .applyIf(
-            isRecordsFullyDesugaredForR8(parameters),
-            b -> b.addKeepRules("-keep class java.lang.Record"))
         .compile()
         .applyIf(parameters.isCfRuntime(), r -> r.inspect(RecordTestUtils::assertRecordsAreRecords))
         .run(parameters.getRuntime(), TestClass.class)
-        .applyIf(
-            isRecordsFullyDesugaredForR8(parameters),
-            r -> r.assertSuccessWithOutput(EXPECTED_RESULT_DESUGARED_RECORD),
-            r -> r.assertSuccessWithOutput(EXPECTED_RESULT_NATIVE_OR_PARTIALLY_DESUGARED_RECORD));
+        .apply(
+            rr ->
+                rr.assertSuccessWithOutput(
+                    getExpectedOutput(
+                        rr.inspector(), isRecordsFullyDesugaredForD8(parameters), false)));
+  }
+
+  private String getExpectedOutput(CodeInspector inspector, boolean isDesugared, boolean isD8) {
+    if (isDesugared) {
+      ClassSubject recordClass = inspector.clazz("java.lang.Record");
+      String recordName;
+      if (recordClass.isPresent() && !isD8) {
+        recordName = recordClass.getFinalName();
+      } else if (parameters.isCfRuntime()) {
+        recordName = "java.lang.Record";
+      } else {
+        recordName = "com.android.tools.r8.RecordTag";
+      }
+      return StringUtils.lines(
+          "class " + recordName, "class records.EmptyRecordAnnotationTest$Empty");
+    }
+    return StringUtils.lines(
+        "class java.lang.Record", "class records.EmptyRecordAnnotationTest$Empty");
   }
 
   record Empty() {}
diff --git a/src/test/java/com/android/tools/r8/internal/benchmarks/appdumps/SystemUIBenchmarks.java b/src/test/java/com/android/tools/r8/internal/benchmarks/appdumps/SystemUIBenchmarks.java
index 045537d..abeb770 100644
--- a/src/test/java/com/android/tools/r8/internal/benchmarks/appdumps/SystemUIBenchmarks.java
+++ b/src/test/java/com/android/tools/r8/internal/benchmarks/appdumps/SystemUIBenchmarks.java
@@ -83,4 +83,9 @@
   public void testBenchmarks() throws Exception {
     super.testBenchmarks();
   }
+
+  @Test
+  public void testSystemUIApp() throws Exception {
+    testBenchmarkWithName("SystemUIApp");
+  }
 }
diff --git a/src/test/java/com/android/tools/r8/ir/optimize/inliner/InlineLibraryInterfaceMethodTest.java b/src/test/java/com/android/tools/r8/ir/optimize/inliner/InlineLibraryInterfaceMethodTest.java
index 9ec6561..7e61ae9 100644
--- a/src/test/java/com/android/tools/r8/ir/optimize/inliner/InlineLibraryInterfaceMethodTest.java
+++ b/src/test/java/com/android/tools/r8/ir/optimize/inliner/InlineLibraryInterfaceMethodTest.java
@@ -57,8 +57,8 @@
             });
 
     // TODO(b/126323172) Add test here to check the same with desugared lambdas.
-    assertEquals(1, counts.run);
-    assertEquals(1, counts.println);
+    assertEquals(0, counts.run);
+    assertEquals(2, counts.println);
   }
 
   private static long countInvokesWithName(MethodSubject methodSubject, String name) {
diff --git a/src/test/java/com/android/tools/r8/kotlin/KotlinClassInlinerTest.java b/src/test/java/com/android/tools/r8/kotlin/KotlinClassInlinerTest.java
index 41c2ec4..10ce745 100644
--- a/src/test/java/com/android/tools/r8/kotlin/KotlinClassInlinerTest.java
+++ b/src/test/java/com/android/tools/r8/kotlin/KotlinClassInlinerTest.java
@@ -13,6 +13,7 @@
 import static com.android.tools.r8.utils.codeinspector.Matchers.isAbsent;
 import static com.android.tools.r8.utils.codeinspector.Matchers.isAbsentIf;
 import static com.android.tools.r8.utils.codeinspector.Matchers.isPresent;
+import static com.android.tools.r8.utils.codeinspector.Matchers.isPresentIf;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -280,14 +281,14 @@
                 assertThat(
                     inspector.clazz(
                         "class_inliner_lambda_k_style.MainKt$testKotlinSequencesStateless$1"),
-                    isAbsent());
+                    isPresentIf(testParameters.isDexRuntime()));
                 assertThat(
                     inspector.clazz(
                         "class_inliner_lambda_k_style.MainKt$testKotlinSequencesStateful$1"),
                     isAbsent());
                 assertThat(
                     inspector.clazz("class_inliner_lambda_k_style.MainKt$testBigExtraMethod$1"),
-                    isPresent());
+                    isPresentIf(testParameters.isCfRuntime()));
               }
             });
   }
diff --git a/src/test/java/com/android/tools/r8/kotlin/lambda/KotlinLambdaMergingTrivialKotlinStyleTest.java b/src/test/java/com/android/tools/r8/kotlin/lambda/KotlinLambdaMergingTrivialKotlinStyleTest.java
index 11b692e..01b94ee 100644
--- a/src/test/java/com/android/tools/r8/kotlin/lambda/KotlinLambdaMergingTrivialKotlinStyleTest.java
+++ b/src/test/java/com/android/tools/r8/kotlin/lambda/KotlinLambdaMergingTrivialKotlinStyleTest.java
@@ -5,7 +5,6 @@
 package com.android.tools.r8.kotlin.lambda;
 
 import static junit.framework.TestCase.assertEquals;
-import static org.hamcrest.CoreMatchers.containsString;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
 
@@ -100,36 +99,21 @@
                   .assertNoOtherClassesMerged());
     } else {
       ClassReference mainKt = Reference.classFromTypeName(getMainClassName());
-      inspector.applyIf(
-          kotlinParameters.getLambdaGeneration().isClass(),
-          i -> {
-            i.assertIsCompleteMergeGroup(
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$3"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$4"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$5"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$6"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$7"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$8"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$9"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$10"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$11"),
-                lambdasInInput.getKStyleLambdaReferenceFromTypeName(
-                    getTestName(), "MainKt$testStateless$12"));
-          },
-          i ->
-              i.assertIsCompleteMergeGroup(
+      inspector
+          .applyIf(
+              kotlinParameters.getLambdaGeneration().isClass(),
+              i -> {
+                i.assertIsCompleteMergeGroup(
+                    lambdasInInput.getKStyleLambdaReferenceFromTypeName(
+                        getTestName(), "MainKt$testStateless$11"),
+                    lambdasInInput.getKStyleLambdaReferenceFromTypeName(
+                        getTestName(), "MainKt$testStateless$12"));
+              },
+              i ->
+                  i.assertIsCompleteMergeGroup(
                       SyntheticItemsTestUtils.syntheticLambdaClass(mainKt, 0),
-                      SyntheticItemsTestUtils.syntheticLambdaClass(mainKt, 1))
-                  .assertNoOtherClassesMerged());
+                      SyntheticItemsTestUtils.syntheticLambdaClass(mainKt, 1)))
+          .assertNoOtherClassesMerged();
     }
   }
 
@@ -143,7 +127,7 @@
     assertEquals(
         kotlinParameters.getLambdaGeneration().isInvokeDynamic()
             ? 0
-            : allowAccessModification && parameters.isCfRuntime() ? 1 : 2,
+            : allowAccessModification && parameters.isCfRuntime() ? 1 : 1,
         lambdasInOutput.size());
   }
 
