# add a debug subcommand for printing LLVM integer type alignment · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/708894cf9903bab2e9b0dde0b609a6cc7cc55ffd)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 708894cf9903bab2e9b0dde0b609a6cc7cc55ffd

Requested commit: 708894cf9903bab2e9b0dde0b609a6cc7cc55ffd

Commit: 708894cf9903bab2e9b0dde0b609a6cc7cc55ffd

Tree: a161dbfb600fef3c647a038e4dcbd142e2389f76

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
add a debug subcommand for printing LLVM integer type alignment

Useful when debugging why upgrading from LLVM 17 to 18 caused C ABI
regressions. Turns out LLVM 18 does the following insane thing:

```diff
-[nix-shell:~/dev/zig/build-llvm17]$ stage4/bin/zig llvm-ints i386-linux-musl
+[nix-shell:~/src/zig/build-llvm18]$ stage4/bin/zig llvm-ints i386-linux-musl
 LLVMABIAlignmentOfType(i1) == 1
 LLVMABIAlignmentOfType(i8) == 1
 LLVMABIAlignmentOfType(i16) == 2
 LLVMABIAlignmentOfType(i32) == 4
 LLVMABIAlignmentOfType(i64) == 4
-LLVMABIAlignmentOfType(i128) == 4
-LLVMABIAlignmentOfType(i256) == 4
+LLVMABIAlignmentOfType(i128) == 16
+LLVMABIAlignmentOfType(i256) == 16
```

````

## Parents

- [6730b366a059a83d64f66644bf49d69cb31a6a08](https://git.cafe/gitcafe/zig/commit/6730b366a059a83d64f66644bf49d69cb31a6a08?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/708894cf9903bab2e9b0dde0b609a6cc7cc55ffd?format=markdown)
