aboutsummaryrefslogtreecommitdiff
path: root/src/RangeSet.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-11-10 19:34:43 -0500
committerGitHub <noreply@github.com>2022-11-10 19:34:43 -0500
commit892fb0fc8830007542381fe845e618dc47493622 (patch)
treef36c0b2a945a20e1e04347f97fdd84a31f037652 /src/RangeSet.zig
parente40c38d258800cd555a4b53af8c711886ca0d38d (diff)
parent7b978bf1e05727f15fc83ae7d2455c08833cc439 (diff)
downloadzig-892fb0fc8830007542381fe845e618dc47493622.tar.gz
zig-892fb0fc8830007542381fe845e618dc47493622.zip
Merge pull request #13074 from topolarity/stage2-opt
stage2: Miscellaneous fixes to vector arithmetic and copy elision
Diffstat (limited to 'src/RangeSet.zig')
-rw-r--r--src/RangeSet.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/RangeSet.zig b/src/RangeSet.zig
index 84cae34365..a5007ef7c8 100644
--- a/src/RangeSet.zig
+++ b/src/RangeSet.zig
@@ -35,8 +35,8 @@ pub fn add(
src: SwitchProngSrc,
) !?SwitchProngSrc {
for (self.ranges.items) |range| {
- if (last.compare(.gte, range.first, ty, self.module) and
- first.compare(.lte, range.last, ty, self.module))
+ if (last.compareAll(.gte, range.first, ty, self.module) and
+ first.compareAll(.lte, range.last, ty, self.module))
{
return range.src; // They overlap.
}
@@ -53,7 +53,7 @@ const LessThanContext = struct { ty: Type, module: *Module };
/// Assumes a and b do not overlap
fn lessThan(ctx: LessThanContext, a: Range, b: Range) bool {
- return a.first.compare(.lt, b.first, ctx.ty, ctx.module);
+ return a.first.compareAll(.lt, b.first, ctx.ty, ctx.module);
}
pub fn spans(self: *RangeSet, first: Value, last: Value, ty: Type) !bool {