NAKAMURA Takumi | dbe7d7e | 2012-12-06 12:05:25 +0000 | [diff] [blame] | 1 | // FIXME: 32-bit target? |
| 2 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s |
Eric Christopher | 85e5156 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 3 | // PR1721 |
| 4 | |
| 5 | struct 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 Carruth | ff0e3a1 | 2012-12-06 11:14:44 +0000 | [diff] [blame] | 12 | // CHECK: and i64 %[[TMP1:[^,]+]], 8589934591 |
Eric Christopher | f883941 | 2011-07-26 22:42:01 +0000 | [diff] [blame] | 13 | // CHECK-NOT: and i64 [[TMP1]], 8589934591 |
Chandler Carruth | ff0e3a1 | 2012-12-06 11:14:44 +0000 | [diff] [blame] | 14 | // CHECK: and i64 %{{[^,]+}}, 8589934591 |
Eric Christopher | 85e5156 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 15 | return a.u33 + b.u33 != 0; |
| 16 | } |