summaryrefslogtreecommitdiff
path: root/compiler/optimizing/locations.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/locations.h')
-rw-r--r--compiler/optimizing/locations.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/locations.h b/compiler/optimizing/locations.h
index de876be9ab..b36e574db7 100644
--- a/compiler/optimizing/locations.h
+++ b/compiler/optimizing/locations.h
@@ -486,11 +486,17 @@ class LocationSummary : public ArenaObject<kArenaAllocMisc> {
void SetOut(Location location, Location::OutputOverlap overlaps = Location::kOutputOverlap) {
DCHECK(output_.IsInvalid());
+ if (kIsDebugBuild && location.IsUnallocated()) {
+ if ((location.GetPolicy() == Location::kSameAsFirstInput) && InAt(0).IsUnallocated()) {
+ DCHECK_NE(InAt(0).GetPolicy(), Location::kAny);
+ }
+ }
output_overlaps_ = overlaps;
output_ = location;
}
void UpdateOut(Location location) {
+ DCHECK(!location.IsUnallocated());
// There are two reasons for updating an output:
// 1) Parameters, where we only know the exact stack slot after
// doing full register allocation.