xakep8 wrote:

@erichkeane 
For powerpc64-unknown-linux-gnu, _BitInt(129) g = 1 lowers through CIR to [24 x 
i8] c"\01\00...", despite the module having a big-endian (E) data layout. 
Classic codegen emits c"\00...\01". CIR then loads the array as i192 and 
truncates it to i129, causing the value to become zero. The helper should order 
the extracted bytes according to the data layout’s endianness. Please add a 
PowerPC64 check covering both the global initializer and the subsequent i192 
load/truncation.

```cpp
_BitInt(129) g = 1;

int g_is_one(void) {
  return g == 1;
}
```

https://github.com/llvm/llvm-project/pull/225470
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to