1*f4a2713aSLionel Sambuc // FIXME: 32-bit target? 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s 3*f4a2713aSLionel Sambuc // PR1721 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc struct s { 6*f4a2713aSLionel Sambuc unsigned long long u33: 33; 7*f4a2713aSLionel Sambuc } a, b; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc // This should have %0 and %1 truncated to 33 bits before any operation. 10*f4a2713aSLionel Sambuc // This can be done using i33 or an explicit and. test(void)11*f4a2713aSLionel Sambuc_Bool test(void) { 12*f4a2713aSLionel Sambuc // CHECK: and i64 %[[TMP1:[^,]+]], 8589934591 13*f4a2713aSLionel Sambuc // CHECK-NOT: and i64 [[TMP1]], 8589934591 14*f4a2713aSLionel Sambuc // CHECK: and i64 %{{[^,]+}}, 8589934591 15*f4a2713aSLionel Sambuc return a.u33 + b.u33 != 0; 16*f4a2713aSLionel Sambuc } 17