diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
commit | 222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch) | |
tree | 7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/CodeGen/2008-01-07-UnusualIntSize.c | |
parent | 3d206f03985b50beacae843d880bccdc91a9f424 (diff) |
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/CodeGen/2008-01-07-UnusualIntSize.c')
-rw-r--r-- | clang/test/CodeGen/2008-01-07-UnusualIntSize.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2008-01-07-UnusualIntSize.c b/clang/test/CodeGen/2008-01-07-UnusualIntSize.c new file mode 100644 index 0000000..bf0ca55 --- /dev/null +++ b/clang/test/CodeGen/2008-01-07-UnusualIntSize.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s +// PR1721 + +struct s { + unsigned long long u33: 33; +} a, b; + +// This should have %0 and %1 truncated to 33 bits before any operation. +// This can be done using i33 or an explicit and. +_Bool test(void) { + // CHECK: and i64 %[[TMP1:[0-9]+]], 8589934591 + // CHECK-NOT: and i64 [[TMP1]], 8589934591 + // CHECK: and i64 %{{[0-9]}}, 8589934591 + return a.u33 + b.u33 != 0; +} |