[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c
Jim Laskey
jlaskey at apple.com
Thu Dec 7 01:57:42 PST 2006
Changes in directory llvm-test/SingleSource/UnitTests:
2006-12-07-Compare64BitConstant.c added (r1.1)
---
Log message:
PowerPC was not checking upper 32 bits of 64 bit constant.
---
Diffs of the changes: (+13 -0)
2006-12-07-Compare64BitConstant.c | 13 +++++++++++++
1 files changed, 13 insertions(+)
Index: llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c
diff -c /dev/null llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c:1.1
*** /dev/null Thu Dec 7 03:57:37 2006
--- llvm-test/SingleSource/UnitTests/2006-12-07-Compare64BitConstant.c Thu Dec 7 03:57:27 2006
***************
*** 0 ****
--- 1,13 ----
+ #include <stdio.h>
+
+ long long Large = 5LL << 48;
+
+ int main(int argc, const char *argv[]) {
+ // Make sure large constants compare correctly.
+ if (((Large >> 48) & 7LL) == 5LL) {
+ printf("Works.\n");
+ } else {
+ printf("Doesn\'t.\n");
+ }
+ return 0;
+ }
More information about the llvm-commits
mailing list