R8's `-assumevalues` flag lets developers declare the expected value range of fields or method return values, enabling dead-code elimination of impossible branches. The most impactful use case is `Build.VERSION.SDK_INT` in Android: by specifying the minimum API level as the lower bound, R8 can strip out all compatibility code paths that will never execute on the app's minimum supported OS version. AndroidX 'core' alone has over 850 such SDK_INT checks, and eliminating unreachable branches reduces APK size and improves runtime performance. Starting with R8 1.4.22 (AGP 3.4 beta 1), this rule is automatically applied based on the `--min-api` flag, so developers get smaller APKs without manual configuration. The post also covers the distinction between `-assumevalues` and `-assumenosideeffects`, and why field reads are retained even after branch elimination.