[all-commits] [llvm/llvm-project] 3906e0: [LLVMABI] Narrow the eightbyte past a union's stor...

Adam Smith via All-commits all-commits at lists.llvm.org
Wed Sep 16 08:13:28 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3906e0a8aa31a083af51eb886d5b9b210e182495
      https://github.com/llvm/llvm-project/commit/3906e0a8aa31a083af51eb886d5b9b210e182495
  Author: Adam Smith <adams at nvidia.com>
  Date:   2026-09-16 (Wed, 16 Sep 2026)

  Changed paths:
    M llvm/lib/ABI/Targets/X86.cpp
    M llvm/unittests/ABI/X86TargetInfoTest.cpp

  Log Message:
  -----------
  [LLVMABI] Narrow the eightbyte past a union's storage member (#223859)

`getIntegerTypeAtOffset` sized the eightbyte from the storage member the
union reduction picked, even at an offset that member does not reach. A
union whose second eightbyte holds one data byte then coerced to `i64`
where clang coerces to `i8`:

```c
union { char c[9]; void *p; };
```

Clang lowers it to `{ ptr, [8 x i8] }`, so that offset lands on padding
and the coercion narrows to a byte. The classifier now does the same,
and sizes the coercion from the union's remaining bytes otherwise.

Assisted-by: Cursor / claude-opus-5



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list