[tint] Simplify more boolean comparisons
Changed: NotEqual, LessThan, GreaterThan, LessThanEq, GreaterThanEq
Change-Id: Ib181557a83b2c871dfd725115fad6f54dee23459
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/273994
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Peter McNeeley <petermcneeley@google.com>
diff --git a/src/tint/lang/core/ir/analysis/for_loop_analysis_test.cc b/src/tint/lang/core/ir/analysis/for_loop_analysis_test.cc
index 4440867..c6ed6f2 100644
--- a/src/tint/lang/core/ir/analysis/for_loop_analysis_test.cc
+++ b/src/tint/lang/core/ir/analysis/for_loop_analysis_test.cc
@@ -59,7 +59,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- condition = b.LessThan<bool>(b.Load(idx), 10_u);
+ condition = b.LessThan(b.Load(idx), 10_u);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -141,7 +141,7 @@
b.Append(loop->Body(), [&] {
auto* access = b.Access(ty.ptr<uniform, vec4<u32>>(), U, 3_i);
auto* load = b.LoadVectorElement(access, 0_u);
- condition = b.LessThan<bool>(load, 10_u);
+ condition = b.LessThan(load, 10_u);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -237,7 +237,7 @@
b.Append(loop->Body(), [&] {
auto* access = b.Access(ty.ptr<uniform, vec4<u32>>(), U, 0_i);
auto* load = b.LoadVectorElement(access, 0_u);
- condition = b.LessThan<bool>(load, 10_u);
+ condition = b.LessThan(load, 10_u);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -340,7 +340,7 @@
b.Append(loop->Body(), [&] {
auto* access = b.Access(ty.ptr<uniform, vec4<u32>>(), U, 0_i);
auto* load = b.LoadVectorElement(access, 0_u);
- condition = b.LessThan<bool>(load, 10_u);
+ condition = b.LessThan(load, 10_u);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -445,7 +445,7 @@
});
b.Append(loop->Body(), [&] {
auto* as_let = b.Let(10_u);
- condition = b.LessThan<bool>(b.Load(idx), as_let);
+ condition = b.LessThan(b.Load(idx), as_let);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -518,7 +518,7 @@
b.Append(loop->Body(), [&] {
b.Store(idx, b.Add<u32>(b.Load(idx), 1_u));
auto* as_let = b.Let(10_u);
- condition = b.LessThan<bool>(b.Load(idx), as_let);
+ condition = b.LessThan(b.Load(idx), as_let);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
@@ -593,7 +593,7 @@
});
b.Append(loop->Body(), [&] {
auto* as_let = b.Let(10_u);
- condition = b.LessThan<bool>(b.Load(idx), as_let);
+ condition = b.LessThan(b.Load(idx), as_let);
ifelse = b.If(condition);
b.Append(ifelse->False(), [&] { //
b.ExitIf(ifelse);
@@ -665,7 +665,7 @@
});
b.Append(loop->Body(), [&] {
auto* as_let = b.Let(10_u);
- condition = b.LessThan<bool>(b.Load(idx), as_let);
+ condition = b.LessThan(b.Load(idx), as_let);
ifelse = b.If(condition);
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
diff --git a/src/tint/lang/core/ir/analysis/integer_range_analysis_test.cc b/src/tint/lang/core/ir/analysis/integer_range_analysis_test.cc
index 7ee3ef8..6384175 100644
--- a/src/tint/lang/core/ir/analysis/integer_range_analysis_test.cc
+++ b/src/tint/lang/core/ir/analysis/integer_range_analysis_test.cc
@@ -1576,7 +1576,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -1652,7 +1652,7 @@
});
b.Append(loop->Body(), [&] {
// 10 < idx
- binary = b.LessThan<bool>(10_i, b.Load(idx));
+ binary = b.LessThan(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -1727,7 +1727,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20u
- binary = b.LessThan<bool>(b.Load(idx), 20_u);
+ binary = b.LessThan(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -1803,7 +1803,7 @@
});
b.Append(loop->Body(), [&] {
// 10u < idx
- binary = b.LessThan<bool>(10_u, b.Load(idx));
+ binary = b.LessThan(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -1878,7 +1878,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_i);
+ binary = b.LessThanEqual(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -1953,7 +1953,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.LessThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2028,7 +2028,7 @@
});
b.Append(loop->Body(), [&] {
// 10 <= idx
- binary = b.LessThanEqual<bool>(10_i, b.Load(idx));
+ binary = b.LessThanEqual(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2103,7 +2103,7 @@
});
b.Append(loop->Body(), [&] {
// 10 <= idx
- binary = b.LessThanEqual<bool>(10_u, b.Load(idx));
+ binary = b.LessThanEqual(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2178,7 +2178,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10
- binary = b.GreaterThan<bool>(b.Load(idx), 10_i);
+ binary = b.GreaterThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2254,7 +2254,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10u
- binary = b.GreaterThan<bool>(b.Load(idx), 10_u);
+ binary = b.GreaterThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2330,7 +2330,7 @@
});
b.Append(loop->Body(), [&] {
// 10 > idx
- binary = b.GreaterThan<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThan(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2406,7 +2406,7 @@
});
b.Append(loop->Body(), [&] {
// 10u > idx
- binary = b.GreaterThan<bool>(10_u, b.Load(idx));
+ binary = b.GreaterThan(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2482,7 +2482,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 10
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 10_i);
+ binary = b.GreaterThanEqual(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2558,7 +2558,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 10
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.GreaterThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2634,7 +2634,7 @@
});
b.Append(loop->Body(), [&] {
// 10 >= idx
- binary = b.GreaterThanEqual<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThanEqual(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2710,7 +2710,7 @@
});
b.Append(loop->Body(), [&] {
// 10u >= idx
- binary = b.GreaterThanEqual<bool>(10_u, b.Load(idx));
+ binary = b.GreaterThanEqual(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2786,7 +2786,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.GreaterThanEqual<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThanEqual(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2855,7 +2855,7 @@
b.Append(loop->Body(), [&] {
// Initialize idy to 1
Var* idy = b.Var("idy", 1_i);
- binary = b.LessThan<bool>(b.Load(idy), 10_i);
+ binary = b.LessThan(b.Load(idy), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2923,7 +2923,7 @@
});
b.Append(loop->Body(), [&] {
// idy < 10
- binary = b.LessThan<bool>(b.Load(idy), 10_i);
+ binary = b.LessThan(b.Load(idy), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2990,11 +2990,11 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
- auto* ifelse_y = b.If(b.LessThan<bool>(b.Load(idy), 10_i));
+ auto* ifelse_y = b.If(b.LessThan(b.Load(idy), 10_i));
b.Append(ifelse_y->True(), [&] {
b.Store(idx, 2_i);
b.ExitIf(ifelse_y);
@@ -3071,7 +3071,7 @@
b.Append(loop->Body(), [&] {
// bitcastX = bitcast<i32>(idx)
auto* bitcastX = b.Bitcast<i32>(b.Load(idx));
- binary = b.LessThan<bool>(bitcastX, 10_i);
+ binary = b.LessThan(bitcastX, 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3139,7 +3139,7 @@
b.Append(loop->Body(), [&] {
// shl = idx << 1
auto* shl = b.ShiftLeft<i32>(b.Load(idx), 1_u);
- binary = b.LessThan<bool>(10_i, shl);
+ binary = b.LessThan(10_i, shl);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3208,7 +3208,7 @@
});
b.Append(loop->Body(), [&] {
// idx < end
- binary = b.LessThan<bool>(b.Load(idx), end);
+ binary = b.LessThan(b.Load(idx), end);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3276,7 +3276,7 @@
});
b.Append(loop->Body(), [&] {
// end > idx
- binary = b.GreaterThan<bool>(end, b.Load(idx));
+ binary = b.GreaterThan(end, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3345,7 +3345,7 @@
b.Append(loop->Body(), [&] {
b.Load(idx);
// end < 10
- binary = b.LessThan<bool>(end, 10_i);
+ binary = b.LessThan(end, 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3414,7 +3414,7 @@
b.Append(loop->Body(), [&] {
b.Load(idx);
// 10 > end
- binary = b.GreaterThan<bool>(10_i, end);
+ binary = b.GreaterThan(10_i, end);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3480,7 +3480,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 0u
- binary = b.LessThan<bool>(b.Load(idx), 0_u);
+ binary = b.LessThan(b.Load(idx), 0_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3546,7 +3546,7 @@
});
b.Append(loop->Body(), [&] {
// 0u > idx
- binary = b.GreaterThan<bool>(0_u, b.Load(idx));
+ binary = b.GreaterThan(0_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3612,7 +3612,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 4294967295u (maximum uint32_t value)
- binary = b.GreaterThan<bool>(b.Load(idx), u32::Highest());
+ binary = b.GreaterThan(b.Load(idx), u32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3678,7 +3678,7 @@
});
b.Append(loop->Body(), [&] {
// 4294967295u (maximum uint32_t value) < idx
- binary = b.LessThan<bool>(u32::Highest(), b.Load(idx));
+ binary = b.LessThan(u32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3744,7 +3744,7 @@
});
b.Append(loop->Body(), [&] {
// idx < -2147483648 (minimum int32_t value)
- binary = b.LessThan<bool>(b.Load(idx), i32::Lowest());
+ binary = b.LessThan(b.Load(idx), i32::Lowest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3810,7 +3810,7 @@
});
b.Append(loop->Body(), [&] {
// -2147483648 (minimum int32_t value) > idx
- binary = b.GreaterThan<bool>(i32::Lowest(), b.Load(idx));
+ binary = b.GreaterThan(i32::Lowest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3876,7 +3876,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 2147483647 (maximum int32_t value)
- binary = b.GreaterThan<bool>(b.Load(idx), i32::Highest());
+ binary = b.GreaterThan(b.Load(idx), i32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3942,7 +3942,7 @@
});
b.Append(loop->Body(), [&] {
// 2147483647i (maximum int32_t value) < idx
- binary = b.LessThan<bool>(i32::Highest(), b.Load(idx));
+ binary = b.LessThan(i32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4008,7 +4008,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 4294967295u (maximum uint32_t value)
- binary = b.LessThanEqual<bool>(b.Load(idx), u32::Highest());
+ binary = b.LessThanEqual(b.Load(idx), u32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4074,7 +4074,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 2147483647 (maximum int32_t value)
- binary = b.LessThanEqual<bool>(b.Load(idx), i32::Highest());
+ binary = b.LessThanEqual(b.Load(idx), i32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4140,7 +4140,7 @@
});
b.Append(loop->Body(), [&] {
// -2147483648 (minimum int32_t value) <= idx
- binary = b.LessThanEqual<bool>(i32::Lowest(), b.Load(idx));
+ binary = b.LessThanEqual(i32::Lowest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4206,7 +4206,7 @@
});
b.Append(loop->Body(), [&] {
// 0 (minimum uint32_t value) <= idx
- binary = b.LessThanEqual<bool>(u32::Lowest(), b.Load(idx));
+ binary = b.LessThanEqual(u32::Lowest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4272,7 +4272,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 0u (minimum uint32_t value)
- binary = b.GreaterThanEqual<bool>(b.Load(idx), u32::Lowest());
+ binary = b.GreaterThanEqual(b.Load(idx), u32::Lowest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4338,7 +4338,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= -2147483648 (minimum int32_t value)
- binary = b.GreaterThanEqual<bool>(b.Load(idx), i32::Lowest());
+ binary = b.GreaterThanEqual(b.Load(idx), i32::Lowest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4404,7 +4404,7 @@
});
b.Append(loop->Body(), [&] {
// 2147483647 (maximum int32_t value) >= idx
- binary = b.GreaterThanEqual<bool>(i32::Highest(), b.Load(idx));
+ binary = b.GreaterThanEqual(i32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4470,7 +4470,7 @@
});
b.Append(loop->Body(), [&] {
// 4294967295 (maximum uint32_t value) >= idx
- binary = b.GreaterThanEqual<bool>(u32::Highest(), b.Load(idx));
+ binary = b.GreaterThanEqual(u32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4535,7 +4535,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
// Now idx can be 10 before the if-statement
b.Add<i32>(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
@@ -4600,14 +4600,14 @@
auto* func = b.Function("func", ty.void_());
func->AppendParam(param);
b.Append(func->Block(), [&] {
- Binary* binaryOnParam = b.LessThan<bool>(param, 30_i);
+ Binary* binaryOnParam = b.LessThan(param, 30_i);
loop = b.Loop();
b.Append(loop->Initializer(), [&] {
idx = b.Var("idx", 0_i);
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binaryOnParam);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4673,7 +4673,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] {
// Now idx < 10
@@ -4744,7 +4744,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitLoop(loop); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -4809,7 +4809,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] {
@@ -4879,7 +4879,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitIf(ifelse); });
@@ -4946,7 +4946,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.ExitLoop(loop);
@@ -5010,7 +5010,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_i);
+ binary = b.LessThanEqual(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5087,7 +5087,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.LessThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5164,7 +5164,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 1
- binary = b.LessThanEqual<bool>(b.Load(idx), 1_i);
+ binary = b.LessThanEqual(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5235,7 +5235,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 1
- binary = b.LessThanEqual<bool>(b.Load(idx), 1_u);
+ binary = b.LessThanEqual(b.Load(idx), 1_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5306,7 +5306,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.LessThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5377,7 +5377,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 20
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 20_i);
+ binary = b.GreaterThanEqual(b.Load(idx), 20_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5453,7 +5453,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 20
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 20_u);
+ binary = b.GreaterThanEqual(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5529,7 +5529,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 20
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 20_i);
+ binary = b.GreaterThanEqual(b.Load(idx), 20_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5600,7 +5600,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 20
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 20_u);
+ binary = b.GreaterThanEqual(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5672,7 +5672,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 10
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.GreaterThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5743,7 +5743,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 4294967294u
- binary = b.LessThanEqual<bool>(b.Load(idx), u32(u32::kHighestValue - 1u));
+ binary = b.LessThanEqual(b.Load(idx), u32(u32::kHighestValue - 1u));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5818,7 +5818,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 2147483646
- binary = b.LessThanEqual<bool>(b.Load(idx), i32(i32::kHighestValue - 1));
+ binary = b.LessThanEqual(b.Load(idx), i32(i32::kHighestValue - 1));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5893,7 +5893,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 1u
- binary = b.GreaterThanEqual<bool>(b.Load(idx), u32(u32::kLowestValue + 1u));
+ binary = b.GreaterThanEqual(b.Load(idx), u32(u32::kLowestValue + 1u));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5968,7 +5968,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= -2147483647
- binary = b.GreaterThanEqual<bool>(b.Load(idx), i32(i32::kLowestValue + 1));
+ binary = b.GreaterThanEqual(b.Load(idx), i32(i32::kLowestValue + 1));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6043,7 +6043,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 1
- binary = b.LessThan<bool>(b.Load(idx), 1_i);
+ binary = b.LessThan(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6114,7 +6114,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6185,7 +6185,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 1
- binary = b.LessThan<bool>(b.Load(idx), 1_u);
+ binary = b.LessThan(b.Load(idx), 1_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6256,7 +6256,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6327,7 +6327,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6398,7 +6398,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10
- binary = b.GreaterThan<bool>(b.Load(idx), 10_i);
+ binary = b.GreaterThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6469,7 +6469,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10
- binary = b.GreaterThan<bool>(b.Load(idx), 10_i);
+ binary = b.GreaterThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6540,7 +6540,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10
- binary = b.GreaterThan<bool>(b.Load(idx), 10_u);
+ binary = b.GreaterThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6611,7 +6611,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 10
- binary = b.GreaterThan<bool>(b.Load(idx), 10_u);
+ binary = b.GreaterThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6682,7 +6682,7 @@
});
b.Append(loop->Body(), [&] {
// idx > 1
- binary = b.GreaterThan<bool>(b.Load(idx), 1_u);
+ binary = b.GreaterThan(b.Load(idx), 1_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6754,7 +6754,7 @@
});
b.Append(loop->Body(), [&] {
// 20 <= idx
- binary = b.LessThanEqual<bool>(20_i, b.Load(idx));
+ binary = b.LessThanEqual(20_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6829,7 +6829,7 @@
});
b.Append(loop->Body(), [&] {
// 20 <= idx
- binary = b.LessThanEqual<bool>(20_u, b.Load(idx));
+ binary = b.LessThanEqual(20_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6904,7 +6904,7 @@
});
b.Append(loop->Body(), [&] {
// 30 <= idx
- binary = b.LessThanEqual<bool>(30_i, b.Load(idx));
+ binary = b.LessThanEqual(30_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6975,7 +6975,7 @@
});
b.Append(loop->Body(), [&] {
// 30u <= idx
- binary = b.LessThanEqual<bool>(30_u, b.Load(idx));
+ binary = b.LessThanEqual(30_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7047,7 +7047,7 @@
});
b.Append(loop->Body(), [&] {
// 10u <= idx
- binary = b.LessThanEqual<bool>(10_u, b.Load(idx));
+ binary = b.LessThanEqual(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7118,7 +7118,7 @@
});
b.Append(loop->Body(), [&] {
// 1u >= idx
- binary = b.LessThanEqual<bool>(u32(u32::kLowestValue + 1u), b.Load(idx));
+ binary = b.LessThanEqual(u32(u32::kLowestValue + 1u), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7193,7 +7193,7 @@
});
b.Append(loop->Body(), [&] {
// -2147483647 >= idx
- binary = b.LessThanEqual<bool>(i32(i32::kLowestValue + 1), b.Load(idx));
+ binary = b.LessThanEqual(i32(i32::kLowestValue + 1), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7269,7 +7269,7 @@
});
b.Append(loop->Body(), [&] {
// 20 >= idx
- binary = b.GreaterThanEqual<bool>(20_i, b.Load(idx));
+ binary = b.GreaterThanEqual(20_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7345,7 +7345,7 @@
});
b.Append(loop->Body(), [&] {
// 20 >= idx
- binary = b.GreaterThanEqual<bool>(20_u, b.Load(idx));
+ binary = b.GreaterThanEqual(20_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7422,7 +7422,7 @@
});
b.Append(loop->Body(), [&] {
// 10 >= idx
- binary = b.GreaterThanEqual<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThanEqual(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7494,7 +7494,7 @@
});
b.Append(loop->Body(), [&] {
// 10u >= idx
- binary = b.GreaterThanEqual<bool>(10_u, b.Load(idx));
+ binary = b.GreaterThanEqual(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7566,7 +7566,7 @@
});
b.Append(loop->Body(), [&] {
// 30u >= idx
- binary = b.GreaterThanEqual<bool>(30_u, b.Load(idx));
+ binary = b.GreaterThanEqual(30_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7637,7 +7637,7 @@
});
b.Append(loop->Body(), [&] {
// 4294967294u >= idx
- binary = b.GreaterThanEqual<bool>(u32(u32::kHighestValue - 1u), b.Load(idx));
+ binary = b.GreaterThanEqual(u32(u32::kHighestValue - 1u), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7712,7 +7712,7 @@
});
b.Append(loop->Body(), [&] {
// 2147483646 >= idx
- binary = b.GreaterThanEqual<bool>(i32(i32::kHighestValue - 1), b.Load(idx));
+ binary = b.GreaterThanEqual(i32(i32::kHighestValue - 1), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7788,7 +7788,7 @@
});
b.Append(loop->Body(), [&] {
// 20 < idx
- binary = b.LessThan<bool>(20_i, b.Load(idx));
+ binary = b.LessThan(20_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7859,7 +7859,7 @@
});
b.Append(loop->Body(), [&] {
// 20 < idx
- binary = b.LessThan<bool>(20_u, b.Load(idx));
+ binary = b.LessThan(20_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -7930,7 +7930,7 @@
});
b.Append(loop->Body(), [&] {
// 30 < idx
- binary = b.LessThan<bool>(30_i, b.Load(idx));
+ binary = b.LessThan(30_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8001,7 +8001,7 @@
});
b.Append(loop->Body(), [&] {
// 30u < idx
- binary = b.LessThan<bool>(30_u, b.Load(idx));
+ binary = b.LessThan(30_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8072,7 +8072,7 @@
});
b.Append(loop->Body(), [&] {
// 10u < idx
- binary = b.LessThan<bool>(10_u, b.Load(idx));
+ binary = b.LessThan(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8144,7 +8144,7 @@
});
b.Append(loop->Body(), [&] {
// 20 > idx
- binary = b.GreaterThan<bool>(20_i, b.Load(idx));
+ binary = b.GreaterThan(20_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8215,7 +8215,7 @@
});
b.Append(loop->Body(), [&] {
// 20 > idx
- binary = b.GreaterThan<bool>(20_u, b.Load(idx));
+ binary = b.GreaterThan(20_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8286,7 +8286,7 @@
});
b.Append(loop->Body(), [&] {
// 10 > idx
- binary = b.GreaterThan<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThan(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8357,7 +8357,7 @@
});
b.Append(loop->Body(), [&] {
// 10u > idx
- binary = b.GreaterThan<bool>(10_u, b.Load(idx));
+ binary = b.GreaterThan(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8428,7 +8428,7 @@
});
b.Append(loop->Body(), [&] {
// 30u > idx
- binary = b.GreaterThan<bool>(30_u, b.Load(idx));
+ binary = b.GreaterThan(30_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8499,7 +8499,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -8587,7 +8587,7 @@
});
b.Append(loop->Body(), [&] {
// 30u > idx
- binary = b.GreaterThan<bool>(30_u, b.Load(idx));
+ binary = b.GreaterThan(30_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9083,7 +9083,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9177,7 +9177,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9299,7 +9299,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9467,7 +9467,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ auto* binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9591,7 +9591,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9668,7 +9668,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 1
- auto* binary = b.LessThan<bool>(b.Load(idx), 1_i);
+ auto* binary = b.LessThan(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9748,7 +9748,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ auto* binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9829,7 +9829,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9843,7 +9843,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 4
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 4_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 4_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -9956,7 +9956,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ auto* binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -9970,7 +9970,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 7
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 7_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 7_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -10082,7 +10082,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10159,7 +10159,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 0
- auto* binary = b.LessThan<bool>(b.Load(idx), 0_i);
+ auto* binary = b.LessThan(b.Load(idx), 0_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10233,7 +10233,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10247,7 +10247,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 4
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 4_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 4_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -10360,7 +10360,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 11
- auto* binary = b.LessThan<bool>(b.Load(idx), 11_u);
+ auto* binary = b.LessThan(b.Load(idx), 11_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10374,7 +10374,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 20
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 20_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 20_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -10487,7 +10487,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10501,7 +10501,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 4
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 4_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 4_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -10610,7 +10610,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10624,7 +10624,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 4
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 4_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 4_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -10736,7 +10736,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10813,7 +10813,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 21
- auto* binary = b.LessThan<bool>(b.Load(idx), 21_i);
+ auto* binary = b.LessThan(b.Load(idx), 21_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10890,7 +10890,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -10967,7 +10967,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 21
- auto* binary = b.LessThan<bool>(b.Load(idx), 21_u);
+ auto* binary = b.LessThan(b.Load(idx), 21_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11074,7 +11074,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11150,7 +11150,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11221,8 +11221,8 @@
});
b.Append(loop->Body(), [&] {
// idx <= u32(i32::kHighestValue) + 1u
- auto* binary = b.LessThanEqual<bool>(
- b.Load(idx), u32(static_cast<uint32_t>(i32::kHighestValue) + 1u));
+ auto* binary =
+ b.LessThanEqual(b.Load(idx), u32(static_cast<uint32_t>(i32::kHighestValue) + 1u));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11293,7 +11293,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11364,7 +11364,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11378,7 +11378,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -11492,7 +11492,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11506,7 +11506,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -11620,7 +11620,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11634,7 +11634,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 4
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 4_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 4_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -11748,7 +11748,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11762,7 +11762,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 10
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 10_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 10_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -11876,7 +11876,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -11890,7 +11890,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 9
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 9_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 9_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12004,7 +12004,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_u);
+ auto* binary = b.LessThan(b.Load(idx), 17_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12018,7 +12018,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 9
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 9_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 9_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12132,7 +12132,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12146,7 +12146,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 9
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 9_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 9_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12256,7 +12256,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12270,7 +12270,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 9
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 9_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 9_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12380,7 +12380,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 17
- auto* binary = b.LessThan<bool>(b.Load(idx), 17_i);
+ auto* binary = b.LessThan(b.Load(idx), 17_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12394,7 +12394,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 9
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 9_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 9_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12504,7 +12504,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12518,7 +12518,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12628,7 +12628,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12642,7 +12642,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12757,7 +12757,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12771,7 +12771,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -12886,7 +12886,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -12900,7 +12900,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13015,7 +13015,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13029,7 +13029,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13139,7 +13139,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13153,7 +13153,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 33
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 33_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 33_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13263,7 +13263,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13277,7 +13277,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 34
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 34_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 34_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13387,7 +13387,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 5
- auto* binary = b.LessThan<bool>(b.Load(idx), 5_u);
+ auto* binary = b.LessThan(b.Load(idx), 5_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13401,7 +13401,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 31
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 31_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 31_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13512,7 +13512,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 32
- auto* binary = b.LessThan<bool>(b.Load(idx), 32_u);
+ auto* binary = b.LessThan(b.Load(idx), 32_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13587,7 +13587,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 5
- auto* binary = b.LessThan<bool>(b.Load(idx), 5_i);
+ auto* binary = b.LessThan(b.Load(idx), 5_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13601,7 +13601,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 30
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 30_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 30_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13712,7 +13712,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 32
- auto* binary = b.LessThan<bool>(b.Load(idx), 32_u);
+ auto* binary = b.LessThan(b.Load(idx), 32_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13787,7 +13787,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13801,7 +13801,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -13916,7 +13916,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -13930,7 +13930,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -14045,7 +14045,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14059,7 +14059,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 5
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 5_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 5_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -14174,7 +14174,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14188,7 +14188,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 6
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 6_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 6_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -14303,7 +14303,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14317,7 +14317,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 6
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 6_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 6_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -14427,7 +14427,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 33
- auto* binary = b.LessThan<bool>(b.Load(idx), 33_u);
+ auto* binary = b.LessThan(b.Load(idx), 33_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14505,7 +14505,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 33
- auto* binary = b.LessThan<bool>(b.Load(idx), 33_u);
+ auto* binary = b.LessThan(b.Load(idx), 33_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14745,7 +14745,7 @@
});
b.Append(loop->Body(), [&] {
// idx < -3
- auto* binary = b.LessThan<bool>(b.Load(idx), -3_i);
+ auto* binary = b.LessThan(b.Load(idx), -3_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14759,7 +14759,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -14874,7 +14874,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 6u
- auto* binary = b.LessThan<bool>(b.Load(idx), 6_u);
+ auto* binary = b.LessThan(b.Load(idx), 6_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -14888,7 +14888,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 2u
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 2_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 2_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -15003,7 +15003,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15017,7 +15017,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 6
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 6_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 6_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -15132,7 +15132,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9u
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15146,7 +15146,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 8u
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 8_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 8_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -15392,7 +15392,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15478,7 +15478,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10u
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ auto* binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15564,7 +15564,7 @@
});
b.Append(loop->Body(), [&] {
// idx < -2
- auto* binary = b.LessThan<bool>(b.Load(idx), -2_i);
+ auto* binary = b.LessThan(b.Load(idx), -2_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15650,7 +15650,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20u
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_u);
+ auto* binary = b.LessThan(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15894,7 +15894,7 @@
});
b.Append(loop->Body(), [&] {
// idx < -3
- auto* binary = b.LessThan<bool>(b.Load(idx), -3_i);
+ auto* binary = b.LessThan(b.Load(idx), -3_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -15908,7 +15908,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 3
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 3_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 3_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -16023,7 +16023,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 6u
- auto* binary = b.LessThan<bool>(b.Load(idx), 6_u);
+ auto* binary = b.LessThan(b.Load(idx), 6_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16037,7 +16037,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 2u
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 2_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 2_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -16152,7 +16152,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_i);
+ auto* binary = b.LessThan(b.Load(idx), 9_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16166,7 +16166,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 6
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 6_i);
+ auto* binary_inner = b.LessThan(b.Load(idy), 6_i);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -16281,7 +16281,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 9u
- auto* binary = b.LessThan<bool>(b.Load(idx), 9_u);
+ auto* binary = b.LessThan(b.Load(idx), 9_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16295,7 +16295,7 @@
});
b.Append(loop2->Body(), [&] {
// idy < 8u
- auto* binary_inner = b.LessThan<bool>(b.Load(idy), 8_u);
+ auto* binary_inner = b.LessThan(b.Load(idy), 8_u);
auto* ifelse_inner = b.If(binary_inner);
b.Append(ifelse_inner->True(), [&] { b.ExitIf(ifelse_inner); });
b.Append(ifelse_inner->False(), [&] { b.ExitLoop(loop2); });
@@ -16541,7 +16541,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_i);
+ auto* binary = b.LessThan(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16627,7 +16627,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 10u
- auto* binary = b.LessThan<bool>(b.Load(idx), 10_u);
+ auto* binary = b.LessThan(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16713,7 +16713,7 @@
});
b.Append(loop->Body(), [&] {
// idx < -2
- auto* binary = b.LessThan<bool>(b.Load(idx), -2_i);
+ auto* binary = b.LessThan(b.Load(idx), -2_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -16799,7 +16799,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20u
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_u);
+ auto* binary = b.LessThan(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -17372,7 +17372,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 1
- auto* binary = b.LessThan<bool>(b.Load(idx), 1_i);
+ auto* binary = b.LessThan(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -17465,7 +17465,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 1u
- auto* binary = b.LessThan<bool>(b.Load(idx), 1_u);
+ auto* binary = b.LessThan(b.Load(idx), 1_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
diff --git a/src/tint/lang/core/ir/analysis/loop_analysis_test.cc b/src/tint/lang/core/ir/analysis/loop_analysis_test.cc
index 88d6e84..86a27e6 100644
--- a/src/tint/lang/core/ir/analysis/loop_analysis_test.cc
+++ b/src/tint/lang/core/ir/analysis/loop_analysis_test.cc
@@ -51,7 +51,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -114,7 +114,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(10_u, b.Load(idx)));
+ auto* ifelse = b.If(b.LessThan(10_u, b.Load(idx)));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -177,7 +177,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.GreaterThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.GreaterThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -242,7 +242,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), end));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), end));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -306,7 +306,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), end));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), end));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -370,7 +370,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_i));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_i));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -433,7 +433,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -496,7 +496,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -559,7 +559,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -622,7 +622,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.GreaterThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.GreaterThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
@@ -694,7 +694,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -776,8 +776,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse =
- b.If(b.LessThan<bool>(b.Bitcast<u32>(b.Bitcast<i32>(b.Load(idx))), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Bitcast<u32>(b.Bitcast<i32>(b.Load(idx))), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -854,15 +853,15 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
- auto* ifelse_v1 = b.If(b.LessThanEqual<bool>(b.Load(v1), u32::Highest()));
+ auto* ifelse_v1 = b.If(b.LessThanEqual(b.Load(v1), u32::Highest()));
b.Append(ifelse_v1->True(), [&] { //
b.ExitLoop(loop);
});
- auto* ifelse_v2 = b.If(b.LessThan<bool>(b.Load(v1), 10_u));
+ auto* ifelse_v2 = b.If(b.LessThan(b.Load(v1), 10_u));
b.Append(ifelse_v2->True(), [&] { //
b.ExitLoop(loop);
});
@@ -949,7 +948,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1011,7 +1010,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1074,7 +1073,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1139,7 +1138,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1203,7 +1202,7 @@
});
b.Append(loop->Body(), [&] {
auto* load = b.Load(idx);
- auto* ifelse = b.If(b.LessThan<bool>(load, load));
+ auto* ifelse = b.If(b.LessThan(load, load));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1268,7 +1267,7 @@
b.Append(loop->Body(), [&] {
auto* load = b.Load(idx);
auto* let = b.Let("end", load);
- auto* ifelse = b.If(b.LessThan<bool>(load, let));
+ auto* ifelse = b.If(b.LessThan(load, let));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1332,7 +1331,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.GreaterThan<bool>(b.Load(idx), 0_i));
+ auto* ifelse = b.If(b.GreaterThan(b.Load(idx), 0_i));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1395,7 +1394,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1458,7 +1457,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_f));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_f));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1521,7 +1520,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1583,7 +1582,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
auto* nested_if = b.If(true);
b.Append(nested_if->True(), [&] { //
@@ -1655,7 +1654,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1719,7 +1718,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1784,7 +1783,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1849,7 +1848,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -1922,7 +1921,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -2011,7 +2010,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -2090,7 +2089,7 @@
b.NextIteration(loop);
});
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -2161,7 +2160,7 @@
idx = b.Var("idx", 0_u);
loop = b.Loop();
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitLoop(loop);
});
@@ -2237,7 +2236,7 @@
b.NextIteration(loop_outer_1);
});
b.Append(loop_outer_1->Body(), [&] {
- auto* ifelse_outer = b.If(b.LessThan<bool>(b.Load(idx_outer_1), 10_u));
+ auto* ifelse_outer = b.If(b.LessThan(b.Load(idx_outer_1), 10_u));
b.Append(ifelse_outer->True(), [&] { //
b.ExitLoop(loop_outer_1);
});
@@ -2248,7 +2247,7 @@
b.NextIteration(loop_inner_1);
});
b.Append(loop_inner_1->Body(), [&] {
- auto* ifelse_inner = b.If(b.LessThan<bool>(b.Load(idx_inner_1), 10_u));
+ auto* ifelse_inner = b.If(b.LessThan(b.Load(idx_inner_1), 10_u));
b.Append(ifelse_inner->True(), [&] { //
b.ExitLoop(loop_inner_1);
});
@@ -2271,7 +2270,7 @@
b.NextIteration(loop_outer_2);
});
b.Append(loop_outer_2->Body(), [&] {
- auto* ifelse_outer = b.If(b.LessThan<bool>(b.Load(idx_outer_2), 10_u));
+ auto* ifelse_outer = b.If(b.LessThan(b.Load(idx_outer_2), 10_u));
b.Append(ifelse_outer->True(), [&] { //
b.ExitLoop(loop_outer_2);
});
@@ -2282,7 +2281,7 @@
b.NextIteration(loop_inner_2);
});
b.Append(loop_inner_2->Body(), [&] {
- auto* ifelse_inner = b.If(b.LessThan<bool>(b.Load(idx_inner_2), 10_u));
+ auto* ifelse_inner = b.If(b.LessThan(b.Load(idx_inner_2), 10_u));
b.Append(ifelse_inner->True(), [&] { //
b.ExitLoop(loop_inner_2);
});
@@ -2431,7 +2430,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_i);
+ binary = b.LessThanEqual(b.Load(idx), 10_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2502,7 +2501,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 10
- binary = b.LessThanEqual<bool>(b.Load(idx), 10_u);
+ binary = b.LessThanEqual(b.Load(idx), 10_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2573,7 +2572,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= i32::kHighestValue
- binary = b.LessThanEqual<bool>(b.Load(idx), i32::Highest());
+ binary = b.LessThanEqual(b.Load(idx), i32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2644,7 +2643,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= u32::kHighestValue
- binary = b.LessThanEqual<bool>(b.Load(idx), u32::Highest());
+ binary = b.LessThanEqual(b.Load(idx), u32::Highest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2715,7 +2714,7 @@
});
b.Append(loop->Body(), [&] {
// 1 <= idx
- binary = b.LessThanEqual<bool>(1_i, b.Load(idx));
+ binary = b.LessThanEqual(1_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2786,7 +2785,7 @@
});
b.Append(loop->Body(), [&] {
// 1 <= idx
- binary = b.LessThanEqual<bool>(1_u, b.Load(idx));
+ binary = b.LessThanEqual(1_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2857,7 +2856,7 @@
});
b.Append(loop->Body(), [&] {
// i32::kLowestValue <= idx
- binary = b.LessThanEqual<bool>(i32::Lowest(), b.Load(idx));
+ binary = b.LessThanEqual(i32::Lowest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2928,7 +2927,7 @@
});
b.Append(loop->Body(), [&] {
// u32::kLowestValue <= idx
- binary = b.LessThanEqual<bool>(u32::Lowest(), b.Load(idx));
+ binary = b.LessThanEqual(u32::Lowest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -2999,7 +2998,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= 1
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 1_i);
+ binary = b.GreaterThanEqual(b.Load(idx), 1_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3070,7 +3069,7 @@
});
b.Append(loop->Body(), [&] {
// idx <= 1
- binary = b.GreaterThanEqual<bool>(b.Load(idx), 1_u);
+ binary = b.GreaterThanEqual(b.Load(idx), 1_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3141,7 +3140,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= i32::kLowestValue
- binary = b.GreaterThanEqual<bool>(b.Load(idx), i32::Lowest());
+ binary = b.GreaterThanEqual(b.Load(idx), i32::Lowest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3212,7 +3211,7 @@
});
b.Append(loop->Body(), [&] {
// idx >= u32::kLowestValue
- binary = b.GreaterThanEqual<bool>(b.Load(idx), u32::Lowest());
+ binary = b.GreaterThanEqual(b.Load(idx), u32::Lowest());
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3283,7 +3282,7 @@
});
b.Append(loop->Body(), [&] {
// 10 >= idx
- binary = b.GreaterThanEqual<bool>(10_i, b.Load(idx));
+ binary = b.GreaterThanEqual(10_i, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3354,7 +3353,7 @@
});
b.Append(loop->Body(), [&] {
// 10 >= idx
- binary = b.GreaterThanEqual<bool>(10_u, b.Load(idx));
+ binary = b.GreaterThanEqual(10_u, b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3425,7 +3424,7 @@
});
b.Append(loop->Body(), [&] {
// i32::kHighestValue >= idx
- binary = b.GreaterThanEqual<bool>(i32::Highest(), b.Load(idx));
+ binary = b.GreaterThanEqual(i32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -3496,7 +3495,7 @@
});
b.Append(loop->Body(), [&] {
// u32::kHighestValue >= idx
- binary = b.GreaterThanEqual<bool>(u32::Highest(), b.Load(idx));
+ binary = b.GreaterThanEqual(u32::Highest(), b.Load(idx));
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
diff --git a/src/tint/lang/core/ir/builder.h b/src/tint/lang/core/ir/builder.h
index d59d744..000dbdd 100644
--- a/src/tint/lang/core/ir/builder.h
+++ b/src/tint/lang/core/ir/builder.h
@@ -719,116 +719,86 @@
ir::CoreBinary* Equal(LHS&& lhs, RHS&& rhs) {
auto* lhs_value = Value(std::forward<LHS>(lhs));
auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
return Append(ir.CreateInstruction<ir::CoreBinary>(InstructionResult(type),
BinaryOp::kEqual, lhs_value, rhs_value));
}
/// Creates an NotEqual operation
- /// @param type the result type of the expression
/// @param lhs the lhs of the add
/// @param rhs the rhs of the add
/// @returns the operation
template <typename LHS, typename RHS>
- ir::CoreBinary* NotEqual(const core::type::Type* type, LHS&& lhs, RHS&& rhs) {
- return Binary(BinaryOp::kNotEqual, type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
- }
-
- /// Creates an NotEqual operation
- /// @tparam TYPE the result type of the expression
- /// @param lhs the lhs of the add
- /// @param rhs the rhs of the add
- /// @returns the operation
- template <typename TYPE, typename LHS, typename RHS>
ir::CoreBinary* NotEqual(LHS&& lhs, RHS&& rhs) {
- auto* type = ir.Types().Get<TYPE>();
- return NotEqual(type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
+ auto* lhs_value = Value(std::forward<LHS>(lhs));
+ auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
+ auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
+ return Append(ir.CreateInstruction<ir::CoreBinary>(
+ InstructionResult(type), BinaryOp::kNotEqual, lhs_value, rhs_value));
}
/// Creates an LessThan operation
- /// @param type the result type of the expression
/// @param lhs the lhs of the add
/// @param rhs the rhs of the add
/// @returns the operation
template <typename LHS, typename RHS>
- ir::CoreBinary* LessThan(const core::type::Type* type, LHS&& lhs, RHS&& rhs) {
- return Binary(BinaryOp::kLessThan, type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
- }
-
- /// Creates an LessThan operation
- /// @tparam TYPE the result type of the expression
- /// @param lhs the lhs of the add
- /// @param rhs the rhs of the add
- /// @returns the operation
- template <typename TYPE, typename LHS, typename RHS>
ir::CoreBinary* LessThan(LHS&& lhs, RHS&& rhs) {
- auto* type = ir.Types().Get<TYPE>();
- return LessThan(type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
+ auto* lhs_value = Value(std::forward<LHS>(lhs));
+ auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
+ auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
+ return Append(ir.CreateInstruction<ir::CoreBinary>(
+ InstructionResult(type), BinaryOp::kLessThan, lhs_value, rhs_value));
}
- /// Creates an GreaterThan operation
- /// @param type the result type of the expression
+ /// Creates an LessThan operation
/// @param lhs the lhs of the add
/// @param rhs the rhs of the add
/// @returns the operation
template <typename LHS, typename RHS>
- ir::CoreBinary* GreaterThan(const core::type::Type* type, LHS&& lhs, RHS&& rhs) {
- return Binary(BinaryOp::kGreaterThan, type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
- }
-
- /// Creates an GreaterThan operation
- /// @tparam TYPE the result type of the expression
- /// @param lhs the lhs of the add
- /// @param rhs the rhs of the add
- /// @returns the operation
- template <typename TYPE, typename LHS, typename RHS>
ir::CoreBinary* GreaterThan(LHS&& lhs, RHS&& rhs) {
- auto* type = ir.Types().Get<TYPE>();
- return GreaterThan(type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
+ auto* lhs_value = Value(std::forward<LHS>(lhs));
+ auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
+ auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
+ return Append(ir.CreateInstruction<ir::CoreBinary>(
+ InstructionResult(type), BinaryOp::kGreaterThan, lhs_value, rhs_value));
}
/// Creates an LessThanEqual operation
- /// @param type the result type of the expression
/// @param lhs the lhs of the add
/// @param rhs the rhs of the add
/// @returns the operation
template <typename LHS, typename RHS>
- ir::CoreBinary* LessThanEqual(const core::type::Type* type, LHS&& lhs, RHS&& rhs) {
- return Binary(BinaryOp::kLessThanEqual, type, std::forward<LHS>(lhs),
- std::forward<RHS>(rhs));
- }
-
- /// Creates an LessThanEqual operation
- /// @tparam TYPE the result type of the expression
- /// @param lhs the lhs of the add
- /// @param rhs the rhs of the add
- /// @returns the operation
- template <typename TYPE, typename LHS, typename RHS>
ir::CoreBinary* LessThanEqual(LHS&& lhs, RHS&& rhs) {
- auto* type = ir.Types().Get<TYPE>();
- return LessThanEqual(type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
+ auto* lhs_value = Value(std::forward<LHS>(lhs));
+ auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
+ auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
+ return Append(ir.CreateInstruction<ir::CoreBinary>(
+ InstructionResult(type), BinaryOp::kLessThanEqual, lhs_value, rhs_value));
}
/// Creates an GreaterThanEqual operation
- /// @param type the result type of the expression
/// @param lhs the lhs of the add
/// @param rhs the rhs of the add
/// @returns the operation
template <typename LHS, typename RHS>
- ir::CoreBinary* GreaterThanEqual(const core::type::Type* type, LHS&& lhs, RHS&& rhs) {
- return Binary(BinaryOp::kGreaterThanEqual, type, std::forward<LHS>(lhs),
- std::forward<RHS>(rhs));
- }
-
- /// Creates an GreaterThanEqual operation
- /// @tparam TYPE the result type of the expression
- /// @param lhs the lhs of the add
- /// @param rhs the rhs of the add
- /// @returns the operation
- template <typename TYPE, typename LHS, typename RHS>
ir::CoreBinary* GreaterThanEqual(LHS&& lhs, RHS&& rhs) {
- auto* type = ir.Types().Get<TYPE>();
- return GreaterThanEqual(type, std::forward<LHS>(lhs), std::forward<RHS>(rhs));
+ auto* lhs_value = Value(std::forward<LHS>(lhs));
+ auto* rhs_value = Value(std::forward<RHS>(rhs));
+ TINT_ASSERT(lhs_value);
+ TINT_ASSERT(rhs_value);
+ auto* type = ir.Types().MatchWidth(ir.Types().bool_(), lhs_value->Type());
+ return Append(ir.CreateInstruction<ir::CoreBinary>(
+ InstructionResult(type), BinaryOp::kGreaterThanEqual, lhs_value, rhs_value));
}
/// Creates an ShiftLeft operation
@@ -1790,13 +1760,12 @@
}
/// Create a ranged loop with a callback to build the loop body.
- /// @param ty the type manager to use for new types
/// @param start the first loop index
/// @param end one past the last loop index
/// @param step the loop index step amount
/// @param cb the callback to call for the loop body
template <typename START, typename END, typename STEP, typename FUNCTION>
- void LoopRange(core::type::Manager& ty, START&& start, END&& end, STEP&& step, FUNCTION&& cb) {
+ void LoopRange(START&& start, END&& end, STEP&& step, FUNCTION&& cb) {
auto* start_value = Value(std::forward<START>(start));
auto* end_value = Value(std::forward<END>(end));
auto* step_value = Value(std::forward<STEP>(step));
@@ -1810,7 +1779,7 @@
});
Append(loop->Body(), [&] {
// Loop until `idx == end`.
- auto* breakif = If(GreaterThanEqual(ty.bool_(), idx, end_value));
+ auto* breakif = If(GreaterThanEqual(idx, end_value));
Append(breakif->True(), [&] { //
ExitLoop(loop);
});
diff --git a/src/tint/lang/core/ir/core_binary_test.cc b/src/tint/lang/core/ir/core_binary_test.cc
index 3c42d15..dba03b0 100644
--- a/src/tint/lang/core/ir/core_binary_test.cc
+++ b/src/tint/lang/core/ir/core_binary_test.cc
@@ -128,7 +128,7 @@
}
TEST_F(IR_BinaryTest, CreateNotEqual) {
- auto* inst = b.NotEqual(mod.Types().bool_(), 4_i, 2_i);
+ auto* inst = b.NotEqual(4_i, 2_i);
ASSERT_TRUE(inst->Is<Binary>());
EXPECT_EQ(inst->Op(), BinaryOp::kNotEqual);
@@ -145,7 +145,7 @@
}
TEST_F(IR_BinaryTest, CreateLessThan) {
- auto* inst = b.LessThan(mod.Types().bool_(), 4_i, 2_i);
+ auto* inst = b.LessThan(4_i, 2_i);
ASSERT_TRUE(inst->Is<Binary>());
EXPECT_EQ(inst->Op(), BinaryOp::kLessThan);
@@ -162,7 +162,7 @@
}
TEST_F(IR_BinaryTest, CreateGreaterThan) {
- auto* inst = b.GreaterThan(mod.Types().bool_(), 4_i, 2_i);
+ auto* inst = b.GreaterThan(4_i, 2_i);
ASSERT_TRUE(inst->Is<Binary>());
EXPECT_EQ(inst->Op(), BinaryOp::kGreaterThan);
@@ -179,7 +179,7 @@
}
TEST_F(IR_BinaryTest, CreateLessThanEqual) {
- auto* inst = b.LessThanEqual(mod.Types().bool_(), 4_i, 2_i);
+ auto* inst = b.LessThanEqual(4_i, 2_i);
ASSERT_TRUE(inst->Is<Binary>());
EXPECT_EQ(inst->Op(), BinaryOp::kLessThanEqual);
@@ -196,7 +196,7 @@
}
TEST_F(IR_BinaryTest, CreateGreaterThanEqual) {
- auto* inst = b.GreaterThanEqual(mod.Types().bool_(), 4_i, 2_i);
+ auto* inst = b.GreaterThanEqual(4_i, 2_i);
ASSERT_TRUE(inst->Is<Binary>());
EXPECT_EQ(inst->Op(), BinaryOp::kGreaterThanEqual);
diff --git a/src/tint/lang/core/ir/transform/builtin_polyfill.cc b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
index 1553404..5704e20 100644
--- a/src/tint/lang/core/ir/transform/builtin_polyfill.cc
+++ b/src/tint/lang/core/ir/transform/builtin_polyfill.cc
@@ -305,7 +305,7 @@
b.InsertBefore(call, [&] {
auto* vec4f = ty.vec4f();
- auto* vec4u = ty.vec4<u32>();
+ auto* vec4u = ty.vec4u();
auto* neg_one = b.Splat(vec4f, -1_f);
auto* one = b.Splat(vec4f, 1_f);
@@ -338,7 +338,7 @@
b.InsertBefore(call, [&] {
auto* vec4f = ty.vec4f();
- auto* vec4u = ty.vec4<u32>();
+ auto* vec4u = ty.vec4u();
auto* zero = b.Zero(vec4f);
auto* one = b.Splat(vec4f, 1_f);
@@ -369,8 +369,8 @@
b.InsertBefore(call, [&] {
auto* vec4f = ty.vec4f();
- auto* vec4u = ty.vec4<u32>();
- auto* vec4i = ty.vec4<i32>();
+ auto* vec4u = ty.vec4u();
+ auto* vec4i = ty.vec4i();
auto* v = b.Construct(vec4u, arg)->Result();
// Shift left to put the 8th bit of each number into the sign bit location, we then
@@ -394,7 +394,7 @@
b.InsertBefore(call, [&] {
auto* vec4f = ty.vec4f();
- auto* vec4u = ty.vec4<u32>();
+ auto* vec4u = ty.vec4u();
auto* v = b.Construct(vec4u, arg)->Result();
v = b.ShiftRight(vec4u, v, b.Construct(vec4u, 0_u, 8_u, 16_u, 24_u))->Result();
@@ -438,7 +438,6 @@
auto* input = call->Args()[0];
auto* result_ty = input->Type();
auto* uint_ty = ty.MatchWidth(ty.u32(), result_ty);
- auto* bool_ty = ty.MatchWidth(ty.bool_(), result_ty);
// Make an u32 constant with the same component count as result_ty.
auto V = [&](uint32_t u) { return b.MatchWidth(u32(u), result_ty); };
@@ -465,19 +464,19 @@
x = b.Bitcast(uint_ty, x)->Result();
}
auto* b16 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(16),
- b.LessThanEqual(bool_ty, x, V(0x0000ffff)));
+ b.LessThanEqual(x, V(0x0000ffff)));
x = b.ShiftLeft(uint_ty, x, b16)->Result();
auto* b8 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(8),
- b.LessThanEqual(bool_ty, x, V(0x00ffffff)));
+ b.LessThanEqual(x, V(0x00ffffff)));
x = b.ShiftLeft(uint_ty, x, b8)->Result();
auto* b4 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(4),
- b.LessThanEqual(bool_ty, x, V(0x0fffffff)));
+ b.LessThanEqual(x, V(0x0fffffff)));
x = b.ShiftLeft(uint_ty, x, b4)->Result();
auto* b2 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(2),
- b.LessThanEqual(bool_ty, x, V(0x3fffffff)));
+ b.LessThanEqual(x, V(0x3fffffff)));
x = b.ShiftLeft(uint_ty, x, b2)->Result();
auto* b1 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(1),
- b.LessThanEqual(bool_ty, x, V(0x7fffffff)));
+ b.LessThanEqual(x, V(0x7fffffff)));
auto* b0 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(0), V(1), b.Equal(x, V(0)));
Instruction* result = b.Add(
uint_ty,
@@ -652,13 +651,13 @@
auto* shr = b.Add<u32>(shl, s);
auto* f1 = b.Zero(result_ty);
auto* t1 = b.ShiftLeft(result_ty, e, b.Construct(uint_ty, shl));
- auto* shl_result = b.Call(result_ty, core::BuiltinFn::kSelect, f1, t1,
- b.LessThan<bool>(shl, 32_u));
+ auto* shl_result =
+ b.Call(result_ty, core::BuiltinFn::kSelect, f1, t1, b.LessThan(shl, 32_u));
auto* f2 =
b.ShiftRight(result_ty, b.ShiftRight(result_ty, shl_result, V(31)), V(1));
auto* t2 = b.ShiftRight(result_ty, shl_result, b.Construct(uint_ty, shr));
b.CallWithResult(call->DetachResult(), core::BuiltinFn::kSelect, f2, t2,
- b.LessThan<bool>(shr, 32_u));
+ b.LessThan(shr, 32_u));
});
call->Destroy();
} break;
@@ -673,7 +672,6 @@
auto* input = call->Args()[0];
auto* result_ty = input->Type();
auto* uint_ty = ty.MatchWidth(ty.u32(), result_ty);
- auto* bool_ty = ty.MatchWidth(ty.bool_(), result_ty);
// Make an u32 constant with the same component count as result_ty.
auto V = [&](uint32_t u) { return b.MatchWidth(u32(u), result_ty); };
@@ -700,7 +698,7 @@
x = b.Bitcast(uint_ty, x)->Result();
auto* inverted = b.Complement(x);
x = b.Call(uint_ty, core::BuiltinFn::kSelect, inverted, x,
- b.LessThan(bool_ty, x, V(0x80000000)))
+ b.LessThan(x, V(0x80000000)))
->Result();
}
auto* b16 = b.Call(uint_ty, core::BuiltinFn::kSelect, V(16), V(0),
@@ -853,17 +851,17 @@
auto* oc = b.Add<u32>(offset, count);
auto* t1 = b.ShiftLeft<u32>(1_u, offset);
auto* s1 = b.Call<u32>(core::BuiltinFn::kSelect, b.Zero<u32>(), t1,
- b.LessThan<bool>(offset, 32_u));
+ b.LessThan(offset, 32_u));
auto* t2 = b.ShiftLeft<u32>(1_u, oc);
auto* s2 = b.Call<u32>(core::BuiltinFn::kSelect, b.Zero<u32>(), t2,
- b.LessThan<bool>(oc, 32_u));
+ b.LessThan(oc, 32_u));
auto* mask_lhs = b.Subtract<u32>(s1, 1_u);
auto* mask_rhs = b.Subtract<u32>(s2, 1_u);
auto* mask = b.Xor<u32>(mask_lhs, mask_rhs);
auto* f3 = b.Zero(result_ty);
auto* t3 = b.ShiftLeft(result_ty, newbits, b.Construct(uint_ty, offset));
auto* s3 = b.Call(result_ty, core::BuiltinFn::kSelect, f3, t3,
- b.LessThan<bool>(offset, 32_u));
+ b.LessThan(offset, 32_u));
auto* result_lhs = b.And(result_ty, s3, mask_as_result_type(mask));
auto* result_rhs = b.And(result_ty, e, mask_as_result_type(b.Complement(mask)));
auto* result = b.Or(result_ty, result_lhs, result_rhs);
diff --git a/src/tint/lang/core/ir/transform/decompose_uniform_access.cc b/src/tint/lang/core/ir/transform/decompose_uniform_access.cc
index 574b11f..c387c96 100644
--- a/src/tint/lang/core/ir/transform/decompose_uniform_access.cc
+++ b/src/tint/lang/core/ir/transform/decompose_uniform_access.cc
@@ -555,7 +555,7 @@
auto* count = arr->Count()->As<core::type::ConstantArrayCount>();
TINT_IR_ASSERT(ir, count);
- b.LoopRange(ty, 0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
+ b.LoopRange(0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
auto* stride = b.Multiply<u32>(idx, u32(arr->ImplicitStride()))->Result();
OffsetData od{0, {start_byte_offset, stride}};
auto* byte_idx = OffsetToValue(od);
diff --git a/src/tint/lang/core/ir/transform/multiplanar_external_texture.cc b/src/tint/lang/core/ir/transform/multiplanar_external_texture.cc
index cc940eb..0e0f885 100644
--- a/src/tint/lang/core/ir/transform/multiplanar_external_texture.cc
+++ b/src/tint/lang/core/ir/transform/multiplanar_external_texture.cc
@@ -355,7 +355,7 @@
auto* D_splat = b.Construct(vec3f, D);
auto* abs_v = b.Call(vec3f, core::BuiltinFn::kAbs, v);
auto* sign_v = b.Call(vec3f, core::BuiltinFn::kSign, v);
- auto* cond = b.LessThan(ty.vec3<bool>(), abs_v, D_splat);
+ auto* cond = b.LessThan(abs_v, D_splat);
auto* t = b.Multiply(vec3f, sign_v, b.Add(vec3f, b.Multiply(vec3f, C, abs_v), F));
auto* f =
b.Multiply(vec3f, sign_v,
diff --git a/src/tint/lang/core/ir/transform/preserve_padding.cc b/src/tint/lang/core/ir/transform/preserve_padding.cc
index 1489392..9667871 100644
--- a/src/tint/lang/core/ir/transform/preserve_padding.cc
+++ b/src/tint/lang/core/ir/transform/preserve_padding.cc
@@ -132,13 +132,11 @@
tint::Switch(
store_type, //
[&](const type::Array* arr) {
- b.LoopRange(
- ty, 0_u, u32(arr->ConstantCount().value()), 1_u, [&](Value* idx) {
- auto* el_ptr =
- b.Access(ty.ptr(storage, arr->ElemType()), target, idx);
- auto* el_value = b.Access(arr->ElemType(), value_param, idx);
- MakeStore(el_ptr->Result(), el_value->Result());
- });
+ b.LoopRange(0_u, u32(arr->ConstantCount().value()), 1_u, [&](Value* idx) {
+ auto* el_ptr = b.Access(ty.ptr(storage, arr->ElemType()), target, idx);
+ auto* el_value = b.Access(arr->ElemType(), value_param, idx);
+ MakeStore(el_ptr->Result(), el_value->Result());
+ });
},
[&](const type::Matrix* mat) {
for (uint32_t i = 0; i < mat->Columns(); i++) {
diff --git a/src/tint/lang/core/ir/transform/prevent_infinite_loops_test.cc b/src/tint/lang/core/ir/transform/prevent_infinite_loops_test.cc
index bef17f4..97f1b31 100644
--- a/src/tint/lang/core/ir/transform/prevent_infinite_loops_test.cc
+++ b/src/tint/lang/core/ir/transform/prevent_infinite_loops_test.cc
@@ -48,7 +48,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
@@ -116,7 +116,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
@@ -321,7 +321,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
@@ -432,7 +432,7 @@
b.NextIteration(loop_outer_1);
b.Append(loop_outer_1->Body(), [&] {
- auto* ifelse_outer = b.If(b.LessThan<bool>(b.Load(idx_outer_1), 10_u));
+ auto* ifelse_outer = b.If(b.LessThan(b.Load(idx_outer_1), 10_u));
b.Append(ifelse_outer->True(), [&] { //
b.ExitLoop(loop_outer_1);
});
@@ -443,7 +443,7 @@
b.NextIteration(loop_inner_1);
b.Append(loop_inner_1->Body(), [&] {
- auto* ifelse_inner = b.If(b.LessThan<bool>(b.Load(idx_inner_1), 10_u));
+ auto* ifelse_inner = b.If(b.LessThan(b.Load(idx_inner_1), 10_u));
b.Append(ifelse_inner->True(), [&] { //
b.ExitLoop(loop_inner_1);
});
@@ -468,7 +468,7 @@
b.NextIteration(loop_outer_2);
b.Append(loop_outer_2->Body(), [&] {
- auto* ifelse_outer = b.If(b.LessThan<bool>(b.Load(idx_outer_2), 10_u));
+ auto* ifelse_outer = b.If(b.LessThan(b.Load(idx_outer_2), 10_u));
b.Append(ifelse_outer->True(), [&] { //
b.ExitLoop(loop_outer_2);
});
@@ -479,7 +479,7 @@
b.NextIteration(loop_inner_2);
b.Append(loop_inner_2->Body(), [&] {
- auto* ifelse_inner = b.If(b.LessThan<bool>(b.Load(idx_inner_2), 10_u));
+ auto* ifelse_inner = b.If(b.LessThan(b.Load(idx_inner_2), 10_u));
b.Append(ifelse_inner->True(), [&] { //
b.ExitLoop(loop_inner_2);
});
@@ -736,7 +736,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(idx), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(idx), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
diff --git a/src/tint/lang/core/ir/transform/resource_binding.cc b/src/tint/lang/core/ir/transform/resource_binding.cc
index e95383c04..b42700d 100644
--- a/src/tint/lang/core/ir/transform/resource_binding.cc
+++ b/src/tint/lang/core/ir/transform/resource_binding.cc
@@ -163,7 +163,7 @@
core::ir::Value* idx,
core::ir::Var* storage_buffer) {
auto* length = b.Access(ty.ptr<storage, u32, read>(), storage_buffer, 0_u);
- auto* len_check = b.LessThan(ty.bool_(), idx, b.Load(length));
+ auto* len_check = b.LessThan(idx, b.Load(length));
auto* has_check = b.If(len_check);
has_check->SetResult(result);
diff --git a/src/tint/lang/core/ir/transform/robustness.cc b/src/tint/lang/core/ir/transform/robustness.cc
index 248f3d9..1964ac5 100644
--- a/src/tint/lang/core/ir/transform/robustness.cc
+++ b/src/tint/lang/core/ir/transform/robustness.cc
@@ -495,7 +495,7 @@
// We then add another `min_stride` elements to get to the end of the accessed memory.
auto* last_slice = b.Add<u32>(offset, b.Multiply<u32>(stride, u32(major_dim - 1)));
auto* end = b.Add<u32>(last_slice, u32(min_stride));
- auto* in_bounds = b.LessThanEqual<bool>(end, array_length);
+ auto* in_bounds = b.LessThanEqual(end, array_length);
if (call->Func() == BuiltinFn::kSubgroupMatrixLoad) {
// Declare a variable to hold the result of the load, or a zero-initialized matrix.
auto* result = b.Var(ty.ptr<function>(matrix_ty));
diff --git a/src/tint/lang/core/ir/transform/robustness_test.cc b/src/tint/lang/core/ir/transform/robustness_test.cc
index 7a1ab01..2cf281a 100644
--- a/src/tint/lang/core/ir/transform/robustness_test.cc
+++ b/src/tint/lang/core/ir/transform/robustness_test.cc
@@ -5424,7 +5424,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20u
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_u);
+ auto* binary = b.LessThan(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5501,7 +5501,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 19u
- auto* binary = b.LessThan<bool>(b.Load(idx), 19_u);
+ auto* binary = b.LessThan(b.Load(idx), 19_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5578,7 +5578,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 21u
- auto* binary = b.LessThan<bool>(b.Load(idx), 21_u);
+ auto* binary = b.LessThan(b.Load(idx), 21_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5694,7 +5694,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 8
- auto* binary = b.LessThan<bool>(b.Load(idx), 8_u);
+ auto* binary = b.LessThan(b.Load(idx), 8_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5782,7 +5782,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_i);
+ auto* binary = b.LessThan(b.Load(idx), 20_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5861,7 +5861,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_i);
+ auto* binary = b.LessThan(b.Load(idx), 20_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -5939,7 +5939,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 19
- auto* binary = b.LessThan<bool>(b.Load(idx), 19_i);
+ auto* binary = b.LessThan(b.Load(idx), 19_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6017,7 +6017,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 21
- auto* binary = b.LessThan<bool>(b.Load(idx), 21_i);
+ auto* binary = b.LessThan(b.Load(idx), 21_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6131,7 +6131,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 20u
- auto* binary = b.LessThan<bool>(b.Load(idx), 20_u);
+ auto* binary = b.LessThan(b.Load(idx), 20_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6215,7 +6215,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 4u
- auto* binary = b.LessThan<bool>(b.Load(idx), 4_u);
+ auto* binary = b.LessThan(b.Load(idx), 4_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6290,7 +6290,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 2u
- auto* binary = b.LessThan<bool>(b.Load(idx), 2_u);
+ auto* binary = b.LessThan(b.Load(idx), 2_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6365,7 +6365,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 5u
- auto* binary = b.LessThan<bool>(b.Load(idx), 5_u);
+ auto* binary = b.LessThan(b.Load(idx), 5_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6470,7 +6470,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 4
- auto* binary = b.LessThan<bool>(b.Load(idx), 4_i);
+ auto* binary = b.LessThan(b.Load(idx), 4_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6547,7 +6547,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 4u
- auto* binary = b.LessThan<bool>(b.Load(idx), 4_u);
+ auto* binary = b.LessThan(b.Load(idx), 4_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6622,7 +6622,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 2u
- auto* binary = b.LessThan<bool>(b.Load(idx), 2_u);
+ auto* binary = b.LessThan(b.Load(idx), 2_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6697,7 +6697,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 5u
- auto* binary = b.LessThan<bool>(b.Load(idx), 5_u);
+ auto* binary = b.LessThan(b.Load(idx), 5_u);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
@@ -6802,7 +6802,7 @@
});
b.Append(loop->Body(), [&] {
// idx < 4
- auto* binary = b.LessThan<bool>(b.Load(idx), 4_i);
+ auto* binary = b.LessThan(b.Load(idx), 4_i);
auto* ifelse = b.If(binary);
b.Append(ifelse->True(), [&] { b.ExitIf(ifelse); });
b.Append(ifelse->False(), [&] { b.ExitLoop(loop); });
diff --git a/src/tint/lang/core/ir/transform/std140.cc b/src/tint/lang/core/ir/transform/std140.cc
index 3abca41..c405cb5 100644
--- a/src/tint/lang/core/ir/transform/std140.cc
+++ b/src/tint/lang/core/ir/transform/std140.cc
@@ -300,7 +300,7 @@
// Create a loop that copies and converts each element of the array.
auto* el_ty = source->Type()->Elements().type;
auto* new_arr = b.Var(ty.ptr(function, arr));
- b.LoopRange(ty, 0_u, u32(arr->ConstantCount().value()), 1_u, [&](Value* idx) {
+ b.LoopRange(0_u, u32(arr->ConstantCount().value()), 1_u, [&](Value* idx) {
// Convert arr[idx] and store to new_arr[idx];
auto* to = b.Access(ty.ptr(function, arr->ElemType()), new_arr, idx);
auto* from = b.Access(el_ty, source, idx)->Result();
diff --git a/src/tint/lang/core/ir/transform/zero_init_workgroup_memory.cc b/src/tint/lang/core/ir/transform/zero_init_workgroup_memory.cc
index e314223..d8445d7 100644
--- a/src/tint/lang/core/ir/transform/zero_init_workgroup_memory.cc
+++ b/src/tint/lang/core/ir/transform/zero_init_workgroup_memory.cc
@@ -143,7 +143,7 @@
// No loop is required if we have at least as many invocations than counts.
if (count <= wgsize) {
// Make the first |count| invocations in the group perform the arrayed stores.
- auto* ifelse = b.If(b.LessThan(ty.bool_(), local_index, u32(count)));
+ auto* ifelse = b.If(b.LessThan(local_index, u32(count)));
b.Append(ifelse->True(), [&] {
for (auto& store : *element_stores) {
GenerateStore(store, count, local_index);
@@ -152,7 +152,7 @@
});
} else {
// Use a loop for arrayed stores that exceed the wgsize
- b.LoopRange(ty, local_index, u32(count), u32(wgsize), [&](Value* index) {
+ b.LoopRange(local_index, u32(count), u32(wgsize), [&](Value* index) {
for (auto& store : *element_stores) {
GenerateStore(store, count, index);
}
diff --git a/src/tint/lang/glsl/writer/raise/binary_polyfill_test.cc b/src/tint/lang/glsl/writer/raise/binary_polyfill_test.cc
index 19c9ff7..223b2a5 100644
--- a/src/tint/lang/glsl/writer/raise/binary_polyfill_test.cc
+++ b/src/tint/lang/glsl/writer/raise/binary_polyfill_test.cc
@@ -267,7 +267,7 @@
b.Append(func->Block(), [&] {
auto* l = b.Let("left", b.Splat(ty.vec2<i32>(), 1_i));
auto* r = b.Let("right", b.Splat(ty.vec2<i32>(), 2_i));
- auto* bin = b.NotEqual(ty.vec2<bool>(), l, r);
+ auto* bin = b.NotEqual(l, r);
b.Let("val", bin);
b.Return(func);
});
@@ -306,7 +306,7 @@
b.Append(func->Block(), [&] {
auto* l = b.Let("left", b.Splat(ty.vec2<f32>(), 1_f));
auto* r = b.Let("right", b.Splat(ty.vec2<f32>(), 2_f));
- auto* bin = b.LessThan(ty.vec2<bool>(), l, r);
+ auto* bin = b.LessThan(l, r);
b.Let("val", bin);
b.Return(func);
});
@@ -345,7 +345,7 @@
b.Append(func->Block(), [&] {
auto* l = b.Let("left", b.Splat(ty.vec2<u32>(), 1_u));
auto* r = b.Let("right", b.Splat(ty.vec2<u32>(), 2_u));
- auto* bin = b.LessThanEqual(ty.vec2<bool>(), l, r);
+ auto* bin = b.LessThanEqual(l, r);
b.Let("val", bin);
b.Return(func);
});
@@ -384,7 +384,7 @@
b.Append(func->Block(), [&] {
auto* l = b.Let("left", b.Splat(ty.vec2<f32>(), 1_f));
auto* r = b.Let("right", b.Splat(ty.vec2<f32>(), 2_f));
- auto* bin = b.GreaterThan(ty.vec2<bool>(), l, r);
+ auto* bin = b.GreaterThan(l, r);
b.Let("val", bin);
b.Return(func);
});
@@ -423,7 +423,7 @@
b.Append(func->Block(), [&] {
auto* l = b.Let("left", b.Splat(ty.vec2<f32>(), 1_f));
auto* r = b.Let("right", b.Splat(ty.vec2<f32>(), 2_f));
- auto* bin = b.GreaterThanEqual(ty.vec2<bool>(), l, r);
+ auto* bin = b.GreaterThanEqual(l, r);
b.Let("val", bin);
b.Return(func);
});
diff --git a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
index df63b9d..cabc004 100644
--- a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
+++ b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
@@ -538,7 +538,7 @@
b.InsertBefore(call, [&] {
args.Push(b.Call(type, core::BuiltinFn::kFloor, val)->Result());
args.Push(b.Call(type, core::BuiltinFn::kCeil, val)->Result());
- args.Push(b.LessThan(ty.MatchWidth(ty.bool_(), type), val, b.Zero(type))->Result());
+ args.Push(b.LessThan(val, b.Zero(type))->Result());
});
auto* trunc = b.ir.CreateInstruction<hlsl::ir::Ternary>(call->DetachResult(), args);
trunc->InsertBefore(call);
diff --git a/src/tint/lang/hlsl/writer/raise/decompose_storage_access.cc b/src/tint/lang/hlsl/writer/raise/decompose_storage_access.cc
index a3ebc4a..dfe2289 100644
--- a/src/tint/lang/hlsl/writer/raise/decompose_storage_access.cc
+++ b/src/tint/lang/hlsl/writer/raise/decompose_storage_access.cc
@@ -658,7 +658,7 @@
auto* count = arr->Count()->As<core::type::ConstantArrayCount>();
TINT_IR_ASSERT(ir, count);
- b.LoopRange(ty, 0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
+ b.LoopRange(0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
auto* access = b.Access(ty.ptr<function>(arr->ElemType()), result_arr, idx);
auto* stride = b.Multiply<u32>(idx, u32(arr->ImplicitStride()));
auto* byte_offset = b.Add<u32>(p, stride);
@@ -685,7 +685,7 @@
auto* count = arr->Count()->As<core::type::ConstantArrayCount>();
TINT_IR_ASSERT(ir, count);
- b.LoopRange(ty, 0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
+ b.LoopRange(0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
auto* from = b.Access(arr->ElemType(), obj, idx);
auto* stride = b.Multiply<u32>(idx, u32(arr->ImplicitStride()));
auto* byte_offset = b.Add<u32>(p, stride);
diff --git a/src/tint/lang/msl/writer/loop_test.cc b/src/tint/lang/msl/writer/loop_test.cc
index 9bf5f85..78f3b43 100644
--- a/src/tint/lang/msl/writer/loop_test.cc
+++ b/src/tint/lang/msl/writer/loop_test.cc
@@ -301,7 +301,7 @@
b.NextIteration(l);
b.Append(l->Body(), [&] {
- auto* ifelse = b.If(b.LessThan<bool>(b.Load(v), 10_u));
+ auto* ifelse = b.If(b.LessThan(b.Load(v), 10_u));
b.Append(ifelse->True(), [&] { //
b.ExitIf(ifelse);
});
diff --git a/src/tint/lang/msl/writer/raise/builtin_polyfill.cc b/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
index 49bfda0..b0f56c3 100644
--- a/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
+++ b/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
@@ -579,10 +579,9 @@
if (type->IsIntegerScalarOrVector()) {
core::ir::Value* pos_one = b.MatchWidth(i32(1), type);
core::ir::Value* neg_one = b.MatchWidth(i32(-1), type);
- const core::type::Type* bool_type = ty.MatchWidth(ty.bool_(), type);
auto* zero = b.Zero(type);
auto* sign = b.Call(type, core::BuiltinFn::kSelect, neg_one, pos_one,
- b.GreaterThan(bool_type, arg, zero));
+ b.GreaterThan(arg, zero));
b.CallWithResult(builtin->DetachResult(), core::BuiltinFn::kSelect, sign, zero,
b.Equal(arg, zero));
} else {
diff --git a/src/tint/lang/msl/writer/raise/packed_vec3.cc b/src/tint/lang/msl/writer/raise/packed_vec3.cc
index fa4cc4e..9b45404 100644
--- a/src/tint/lang/msl/writer/raise/packed_vec3.cc
+++ b/src/tint/lang/msl/writer/raise/packed_vec3.cc
@@ -489,7 +489,7 @@
b.Return(func, b.Construct(unpacked_arr, std::move(elements)));
} else {
auto* result = b.Var(ty.ptr<function>(unpacked_arr));
- b.LoopRange(ty, u32(0), u32(count), u32(1), [&](core::ir::Value* idx) {
+ b.LoopRange(u32(0), u32(count), u32(1), [&](core::ir::Value* idx) {
auto* to =
b.Access(ty.ptr(function, unpacked_arr->ElemType()), result, idx);
auto* unpacked_el = load_array_element(idx);
@@ -631,7 +631,7 @@
store_array_element(b.Constant(u32(i)));
}
} else {
- b.LoopRange(ty, u32(0), u32(count), u32(1), [&](core::ir::Value* idx) { //
+ b.LoopRange(u32(0), u32(count), u32(1), [&](core::ir::Value* idx) { //
store_array_element(idx);
});
}
diff --git a/src/tint/lang/msl/writer/raise/simd_ballot.cc b/src/tint/lang/msl/writer/raise/simd_ballot.cc
index 38a5a10..5e4ae18 100644
--- a/src/tint/lang/msl/writer/raise/simd_ballot.cc
+++ b/src/tint/lang/msl/writer/raise/simd_ballot.cc
@@ -142,7 +142,7 @@
// tint_subgroup_size_mask[0u] = high;
// tint_subgroup_size_mask[1u] = low;
b.InsertBefore(ep->Block()->Front(), [&] {
- auto* gt32 = b.GreaterThan<bool>(subgroup_size, u32(32));
+ auto* gt32 = b.GreaterThan(subgroup_size, u32(32));
auto* high_mask =
b.ShiftRight<u32>(u32::Highest(), b.Subtract<u32>(u32(32), subgroup_size));
auto* high = b.Call<u32>(core::BuiltinFn::kSelect, high_mask, u32::Highest(), gt32);
diff --git a/src/tint/lang/spirv/reader/lower/builtins.cc b/src/tint/lang/spirv/reader/lower/builtins.cc
index f5ceb0a..fb9670a 100644
--- a/src/tint/lang/spirv/reader/lower/builtins.cc
+++ b/src/tint/lang/spirv/reader/lower/builtins.cc
@@ -874,7 +874,7 @@
if (I->Type()->IsFloatScalar()) {
auto* neg = b.Negation(N);
auto* sel = b.Multiply(I->Type(), I, Nref)->Result();
- sel = b.LessThan(ty.bool_(), sel, b.Zero(sel->Type()))->Result();
+ sel = b.LessThan(sel, b.Zero(sel->Type()))->Result();
b.CallWithResult(call->DetachResult(), core::BuiltinFn::kSelect, neg, N, sel);
} else {
b.CallWithResult(call->DetachResult(), core::BuiltinFn::kFaceForward, N, I, Nref);
diff --git a/src/tint/lang/spirv/reader/lower/transpose_row_major.cc b/src/tint/lang/spirv/reader/lower/transpose_row_major.cc
index ba1151b..a6472aa 100644
--- a/src/tint/lang/spirv/reader/lower/transpose_row_major.cc
+++ b/src/tint/lang/spirv/reader/lower/transpose_row_major.cc
@@ -586,7 +586,7 @@
b.Append(fn->Block(), [&] {
auto* res = b.Var(ty.ptr(function, to_ty));
- b.LoopRange(ty, u32(0), u32(*count), u32(1), [&](core::ir::Value* idx) {
+ b.LoopRange(u32(0), u32(*count), u32(1), [&](core::ir::Value* idx) {
core::ir::Value* transposed = nullptr;
auto* cur = b.Access(from_ty->ElemType(), in, idx);
if (auto* nested = outer_ty->ElemType()->As<core::type::Array>()) {
diff --git a/src/tint/lang/spirv/writer/loop_test.cc b/src/tint/lang/spirv/writer/loop_test.cc
index 74ef722..e893c86 100644
--- a/src/tint/lang/spirv/writer/loop_test.cc
+++ b/src/tint/lang/spirv/writer/loop_test.cc
@@ -642,7 +642,7 @@
auto* cont_param = b.BlockParam(ty.i32());
loop->Continuing()->SetParams({cont_param});
b.Append(loop->Continuing(), [&] {
- auto* cmp = b.GreaterThan(ty.bool_(), cont_param, 5_i);
+ auto* cmp = b.GreaterThan(cont_param, 5_i);
b.BreakIf(loop, cmp, /* next_iter */ Vector{cont_param}, /* exit */ Empty);
});
@@ -703,7 +703,7 @@
auto* cont_param_b = b.BlockParam(ty.bool_());
loop->Continuing()->SetParams({cont_param_a, cont_param_b});
b.Append(loop->Continuing(), [&] {
- auto* cmp = b.GreaterThan(ty.bool_(), cont_param_a, 5_i);
+ auto* cmp = b.GreaterThan(cont_param_a, 5_i);
auto* not_b = b.Not(cont_param_b);
b.BreakIf(loop, cmp, b.Values(cont_param_a, not_b), Empty);
});
@@ -771,7 +771,7 @@
auto* cont_param = b.BlockParam(ty.i32());
loop->Continuing()->SetParams({cont_param});
b.Append(loop->Continuing(), [&] {
- auto* cmp = b.GreaterThan(ty.bool_(), cont_param, 5_i);
+ auto* cmp = b.GreaterThan(cont_param, 5_i);
b.BreakIf(loop, cmp, /* next_iter */ Vector{cont_param}, /* exit */ Empty);
});
@@ -844,7 +844,7 @@
auto* cont_param = b.BlockParam(ty.i32());
outer->Continuing()->SetParams({cont_param});
b.Append(outer->Continuing(), [&] {
- auto* cmp = b.GreaterThan(ty.bool_(), cont_param, 5_i);
+ auto* cmp = b.GreaterThan(cont_param, 5_i);
b.BreakIf(outer, cmp, /* next_iter */ Vector{cont_param}, /* exit */ Empty);
});
diff --git a/src/tint/lang/spirv/writer/raise/fork_explicit_layout_types.cc b/src/tint/lang/spirv/writer/raise/fork_explicit_layout_types.cc
index d01f8ab..bdf700b 100644
--- a/src/tint/lang/spirv/writer/raise/fork_explicit_layout_types.cc
+++ b/src/tint/lang/spirv/writer/raise/fork_explicit_layout_types.cc
@@ -356,7 +356,7 @@
// Create a local variable to hold the converted result.
// Convert each element one at a time, writing into the local variable.
auto* result = b.Var(ty.ptr<function>(dst_array));
- b.LoopRange(ty, 0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
+ b.LoopRange(0_u, u32(count->value), 1_u, [&](core::ir::Value* idx) {
auto* extracted = b.Access(src_array->ElemType(), input, idx)->Result();
auto* converted = ConvertIfNeeded(dst_array->ElemType(), extracted);
auto* dst_ptr = b.Access(ty.ptr(function, dst_array->ElemType()), result, idx);
diff --git a/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc b/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc
index 9583c45..4585d5e 100644
--- a/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc
+++ b/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc
@@ -1314,15 +1314,15 @@
case core::BinaryOp::kEqual:
return builder_.Equal(lhs, rhs);
case core::BinaryOp::kNotEqual:
- return builder_.NotEqual(ty, lhs, rhs);
+ return builder_.NotEqual(lhs, rhs);
case core::BinaryOp::kLessThan:
- return builder_.LessThan(ty, lhs, rhs);
+ return builder_.LessThan(lhs, rhs);
case core::BinaryOp::kGreaterThan:
- return builder_.GreaterThan(ty, lhs, rhs);
+ return builder_.GreaterThan(lhs, rhs);
case core::BinaryOp::kLessThanEqual:
- return builder_.LessThanEqual(ty, lhs, rhs);
+ return builder_.LessThanEqual(lhs, rhs);
case core::BinaryOp::kGreaterThanEqual:
- return builder_.GreaterThanEqual(ty, lhs, rhs);
+ return builder_.GreaterThanEqual(lhs, rhs);
case core::BinaryOp::kShiftLeft:
return builder_.ShiftLeft(ty, lhs, rhs);
case core::BinaryOp::kShiftRight:
diff --git a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program_test.cc b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program_test.cc
index e6c202a..a585a9d 100644
--- a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program_test.cc
+++ b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program_test.cc
@@ -1204,7 +1204,7 @@
auto* pb = b.FunctionParam("b", ty.i32());
fn->SetParams({pa, pb});
- b.Append(fn->Block(), [&] { b.Return(fn, b.NotEqual(ty.bool_(), pa, pb)); });
+ b.Append(fn->Block(), [&] { b.Return(fn, b.NotEqual(pa, pb)); });
EXPECT_WGSL(R"(
fn f(a : i32, b : i32) -> bool {
@@ -1219,7 +1219,7 @@
auto* pb = b.FunctionParam("b", ty.i32());
fn->SetParams({pa, pb});
- b.Append(fn->Block(), [&] { b.Return(fn, b.LessThan(ty.bool_(), pa, pb)); });
+ b.Append(fn->Block(), [&] { b.Return(fn, b.LessThan(pa, pb)); });
EXPECT_WGSL(R"(
fn f(a : i32, b : i32) -> bool {
@@ -1234,7 +1234,7 @@
auto* pb = b.FunctionParam("b", ty.i32());
fn->SetParams({pa, pb});
- b.Append(fn->Block(), [&] { b.Return(fn, b.GreaterThan(ty.bool_(), pa, pb)); });
+ b.Append(fn->Block(), [&] { b.Return(fn, b.GreaterThan(pa, pb)); });
EXPECT_WGSL(R"(
fn f(a : i32, b : i32) -> bool {
@@ -1249,7 +1249,7 @@
auto* pb = b.FunctionParam("b", ty.i32());
fn->SetParams({pa, pb});
- b.Append(fn->Block(), [&] { b.Return(fn, b.LessThanEqual(ty.bool_(), pa, pb)); });
+ b.Append(fn->Block(), [&] { b.Return(fn, b.LessThanEqual(pa, pb)); });
EXPECT_WGSL(R"(
fn f(a : i32, b : i32) -> bool {
@@ -1264,7 +1264,7 @@
auto* pb = b.FunctionParam("b", ty.i32());
fn->SetParams({pa, pb});
- b.Append(fn->Block(), [&] { b.Return(fn, b.GreaterThanEqual(ty.bool_(), pa, pb)); });
+ b.Append(fn->Block(), [&] { b.Return(fn, b.GreaterThanEqual(pa, pb)); });
EXPECT_WGSL(R"(
fn f(a : i32, b : i32) -> bool {
@@ -2667,7 +2667,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* if_ = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if_ = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if_->True(), [&] { b.ExitIf(if_); });
b.Append(if_->False(), [&] { b.ExitLoop(loop); });
b.Continue(loop);
@@ -2699,7 +2699,7 @@
auto* loop = b.Loop();
b.Append(loop->Body(), [&] {
- auto* if_ = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if_ = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if_->True(), [&] { b.ExitIf(if_); });
b.Append(if_->False(), [&] { b.ExitLoop(loop); });
b.Continue(loop);
@@ -2733,7 +2733,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* if_ = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if_ = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if_->True(), [&] { b.ExitIf(if_); });
b.Append(if_->False(), [&] { b.ExitLoop(loop); });
b.Continue(loop);
@@ -2767,7 +2767,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* if1 = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if1 = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if1->True(), [&] { b.ExitIf(if1); });
b.Append(if1->False(), [&] { b.ExitLoop(loop); });
@@ -2818,7 +2818,7 @@
auto* loop = b.Loop();
b.Append(loop->Body(), [&] {
- auto* if1 = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if1 = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if1->True(), [&] { b.ExitIf(if1); });
b.Append(if1->False(), [&] { b.ExitLoop(loop); });
@@ -2872,7 +2872,7 @@
b.NextIteration(loop);
b.Append(loop->Body(), [&] {
- auto* if1 = b.If(b.LessThan(ty.bool_(), b.Load(i), 5_i));
+ auto* if1 = b.If(b.LessThan(b.Load(i), 5_i));
b.Append(if1->True(), [&] { b.ExitIf(if1); });
b.Append(if1->False(), [&] { b.ExitLoop(loop); });
@@ -2923,7 +2923,7 @@
b.Append(loop->Body(), [&] {
auto* load = b.Load(i);
auto* call = b.Call(ty.i32(), fn_n, 1_i);
- auto* if_ = b.If(b.LessThan(ty.bool_(), load, call));
+ auto* if_ = b.If(b.LessThan(load, call));
b.Append(if_->True(), [&] { b.ExitIf(if_); });
b.Append(if_->False(), [&] { b.ExitLoop(loop); });
@@ -3001,7 +3001,7 @@
b.Append(loop->Body(), [&] {
auto* load_i = b.Load(i);
- auto* cmp = b.LessThan(ty.bool_(), load_i, 10_u);
+ auto* cmp = b.LessThan(load_i, 10_u);
auto* if_ = b.If(cmp);
b.Append(if_->True(), [&] { b.ExitIf(if_); });
b.Append(if_->False(), [&] { b.ExitLoop(loop); });