aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-06-21 20:20:48 -0400
committerGitHub <noreply@github.com>2021-06-21 20:20:48 -0400
commitc6844072ce440f581787bf97909261084a9edc6c (patch)
treeb0cade24a1ee14777be05644c19d76d158c3ab29 /src/codegen/spirv.zig
parent8a6de78e0787015153707361a58659834d4c39c2 (diff)
parent7bebb24838a603a436b58e49ee85110af9e8e05f (diff)
downloadzig-c6844072ce440f581787bf97909261084a9edc6c.tar.gz
zig-c6844072ce440f581787bf97909261084a9edc6c.zip
Merge pull request #9047 from g-w1/spider-astgen
stage2 astgen: catch unused vars
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...