[ir] Add missing non-deterministic evaluation order checks These were likely dropped during refactorings for inferring result types in the builder. Change-Id: Ia27d328c14cc8d936d309a60f0ae351b70cfbb34 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/293379 Reviewed-by: Peter McNeeley <petermcneeley@google.com> Commit-Queue: Peter McNeeley <petermcneeley@google.com> Commit-Queue: James Price <jrprice@google.com> Auto-Submit: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/builder.h b/src/tint/lang/core/ir/builder.h index eeef072..7e07e96 100644 --- a/src/tint/lang/core/ir/builder.h +++ b/src/tint/lang/core/ir/builder.h
@@ -723,6 +723,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* Equal(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value); @@ -738,6 +739,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* NotEqual(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value); @@ -753,6 +755,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* LessThan(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value); @@ -768,6 +771,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* GreaterThan(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value); @@ -783,6 +787,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* LessThanEqual(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value); @@ -798,6 +803,7 @@ /// @returns the operation template <typename LHS, typename RHS> ir::CoreBinary* GreaterThanEqual(LHS&& lhs, RHS&& rhs) { + CheckForNonDeterministicEvaluation<LHS, RHS>(); auto* lhs_value = Value(std::forward<LHS>(lhs)); auto* rhs_value = Value(std::forward<RHS>(rhs)); TINT_ASSERT(lhs_value);