stage2: Implement @bitReverse and @byteSwap

This change implements the above built-ins for Sema and the LLVM
backend. Other backends have had placeholders added for lowering.
This commit is contained in:
Cody Tapscott
2022-02-13 15:04:46 -07:00
parent dee96e2e2f
commit ef417f19e1
17 changed files with 487 additions and 21 deletions

View File

@@ -1709,6 +1709,8 @@ fn genBody(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, OutO
.clz => try airBuiltinCall(f, inst, "clz"),
.ctz => try airBuiltinCall(f, inst, "ctz"),
.popcount => try airBuiltinCall(f, inst, "popcount"),
.byte_swap => try airBuiltinCall(f, inst, "byte_swap"),
.bit_reverse => try airBuiltinCall(f, inst, "bit_reverse"),
.tag_name => try airTagName(f, inst),
.error_name => try airErrorName(f, inst),
.splat => try airSplat(f, inst),