diff options
Diffstat (limited to 'test/CodeGen/bitfield-promote.c')
-rw-r--r-- | test/CodeGen/bitfield-promote.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/CodeGen/bitfield-promote.c b/test/CodeGen/bitfield-promote.c index 4c3292c..93aaa9d 100644 --- a/test/CodeGen/bitfield-promote.c +++ b/test/CodeGen/bitfield-promote.c @@ -1,18 +1,22 @@ -// RUN: %clang -O3 -emit-llvm -S -o %t %s -// RUN: grep 'ret i64 4294967292' %t | count 2 -// RUN: grep 'ret i64 -4' %t | count 1 +// RUN: %clang -O3 -emit-llvm -S -o - %s | FileCheck %s long long f0(void) { struct { unsigned f0 : 32; } x = { 18 }; return (long long) (x.f0 - (int) 22); } +// CHECK: @f0() +// CHECK: ret i64 4294967292 long long f1(void) { struct { unsigned f0 : 31; } x = { 18 }; return (long long) (x.f0 - (int) 22); } +// CHECK: @f1() +// CHECK: ret i64 -4 long long f2(void) { struct { unsigned f0 ; } x = { 18 }; return (long long) (x.f0 - (int) 22); } +// CHECK: @f2() +// CHECK: ret i64 4294967292 |