Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: src/compiler/representation-change.h

Issue 2167593002: [turbofan] Introduce TruncateTaggedToBit operator for ToBoolean truncation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix remaining bugs. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.h
diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h
index fbb4cb5c95649037e02432056242ace665533529..84ea3c1afe48bf0e7f8ca53c950cf246b51d165a 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -29,6 +29,9 @@ class Truncation final {
// Queries.
bool IsUnused() const { return kind_ == TruncationKind::kNone; }
+ bool IsUsedAsBool() const {
+ return LessGeneral(kind_, TruncationKind::kBool);
+ }
bool IsUsedAsWord32() const {
return LessGeneral(kind_, TruncationKind::kWord32);
}
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698