blob: c37c89e7051c1cd5d556d3c5355173b6a0e6e850 [file] [log] [blame]
NAKAMURA Takumidbe7d7e2012-12-06 12:05:25 +00001// FIXME: 32-bit target?
2// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
Eric Christopher85e51562011-07-26 22:17:02 +00003// PR1721
4
5struct s {
6 unsigned long long u33: 33;
7} a, b;
8
9// This should have %0 and %1 truncated to 33 bits before any operation.
10// This can be done using i33 or an explicit and.
11_Bool test(void) {
Chandler Carruthff0e3a12012-12-06 11:14:44 +000012 // CHECK: and i64 %[[TMP1:[^,]+]], 8589934591
Eric Christopherf8839412011-07-26 22:42:01 +000013 // CHECK-NOT: and i64 [[TMP1]], 8589934591
Chandler Carruthff0e3a12012-12-06 11:14:44 +000014 // CHECK: and i64 %{{[^,]+}}, 8589934591
Eric Christopher85e51562011-07-26 22:17:02 +000015 return a.u33 + b.u33 != 0;
16}