From 24d4c642e822fb2d5ea7d571da40fbe56b6d1013 Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Mon, 5 Aug 2024 15:18:49 -0400 Subject: [PATCH] Update clambcc/clambc-compiler.py --- clambcc/clambc-compiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clambcc/clambc-compiler.py b/clambcc/clambc-compiler.py index efe897db96..5975eb92ac 100755 --- a/clambcc/clambc-compiler.py +++ b/clambcc/clambc-compiler.py @@ -599,7 +599,11 @@ def createInputSourceFile(clangLLVM: ClangLLVM, name: str, args: list, options: 'verify', # Perform lowering pass. - # TODO: What do this do? + # In practice, this lowering pass changes index sizes from 64bit to 32bit in `GetElementPtr` instructions. + # There are some other lowering pass cases that are not run, either with our current signature set or because of prior passes. + # For example, one of them lowers all `PtrToInt` instructions to point have a type of `i8`. + # However, `PtrToIntInst` is not allowed, so this code never executes. + # It's possible some of these lowering pass cases were works-in-progress that were solved another way. 'clambc-lowering-notfinal', 'verify',