Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
| 2 | // PR1721 |
| 3 | |
| 4 | struct s { |
| 5 | unsigned long long u33: 33; |
| 6 | } a, b; |
| 7 | |
| 8 | // This should have %0 and %1 truncated to 33 bits before any operation. |
| 9 | // This can be done using i33 or an explicit and. |
| 10 | _Bool test(void) { |
Eric Christopher | 041e409 | 2011-07-26 22:42:01 +0000 | [diff] [blame] | 11 | // CHECK: and i64 %[[TMP1:[0-9]+]], 8589934591 |
| 12 | // CHECK-NOT: and i64 [[TMP1]], 8589934591 |
| 13 | // CHECK: and i64 %{{[0-9]}}, 8589934591 |
Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 14 | return a.u33 + b.u33 != 0; |
| 15 | } |