[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / bitfield-promote.c
blob93aaa9d8b7a0b8e6b4b897313808aa44cb3a15e9
1 // RUN: %clang -O3 -emit-llvm -S -o - %s | FileCheck %s
3 long long f0(void) {
4 struct { unsigned f0 : 32; } x = { 18 };
5 return (long long) (x.f0 - (int) 22);
7 // CHECK: @f0()
8 // CHECK: ret i64 4294967292
10 long long f1(void) {
11 struct { unsigned f0 : 31; } x = { 18 };
12 return (long long) (x.f0 - (int) 22);
14 // CHECK: @f1()
15 // CHECK: ret i64 -4
17 long long f2(void) {
18 struct { unsigned f0 ; } x = { 18 };
19 return (long long) (x.f0 - (int) 22);
21 // CHECK: @f2()
22 // CHECK: ret i64 4294967292