From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGen/2008-01-07-UnusualIntSize.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 clang/test/CodeGen/2008-01-07-UnusualIntSize.c (limited to 'clang/test/CodeGen/2008-01-07-UnusualIntSize.c') 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; +} -- cgit v1.2.3