aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorJacob G-W <jacoblevgw@gmail.com>2021-06-09 21:35:42 -0400
committerAndrew Kelley <andrew@ziglang.org>2021-06-21 17:03:03 -0700
commit641ecc260f43ffb2398acb80cbd141535dbbb03d (patch)
tree87455d3b460f517ad35bcda2b3a2e38599dd4aa1 /src/codegen/spirv.zig
parentd34a1ccb0ea75ba31f374b8b2d34e18326b147b1 (diff)
downloadzig-641ecc260f43ffb2398acb80cbd141535dbbb03d.tar.gz
zig-641ecc260f43ffb2398acb80cbd141535dbbb03d.zip
std, src, doc, test: remove unused variables
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index 3bff09bd8d..9e0cd19f6f 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -714,7 +714,6 @@ pub const DeclGen = struct {
return self.fail(inst.base.src, "TODO: SPIR-V backend: binary operations for strange integers", .{});
}
- const is_bool = info.class == .bool;
const is_float = info.class == .float;
const is_signed = info.signedness == .signed;
// **Note**: All these operations must be valid for vectors as well!
@@ -802,8 +801,6 @@ pub const DeclGen = struct {
const result_id = self.spv.allocResultId();
const result_type_id = try self.genType(inst.base.src, inst.base.ty);
- const info = try self.arithmeticTypeInfo(inst.operand.ty);
-
const opcode = switch (inst.base.tag) {
// Bool -> bool
.not => Opcode.OpLogicalNot,
@@ -867,6 +864,7 @@ pub const DeclGen = struct {
// are not allowed to be created from a phi node, and throw an error for those. For now, genType already throws
// an error for pointers.
const result_type_id = try self.genType(inst.base.src, inst.base.ty);
+ _ = result_type_id;
try writeOpcode(&self.code, .OpPhi, 2 + @intCast(u16, incoming_blocks.items.len * 2)); // result type + result + variable/parent...