Changes in directory llvm-test/SingleSource/UnitTests/Integer:
multiple_assign.c added (r1.1) part_select2.c added (r1.1) --- Log message: Add new test cases. --- Diffs of the changes: (+43 -0) multiple_assign.c | 8 ++++++++ part_select2.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) Index: llvm-test/SingleSource/UnitTests/Integer/multiple_assign.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/multiple_assign.c:1.1 *** /dev/null Wed May 16 23:35:23 2007 --- llvm-test/SingleSource/UnitTests/Integer/multiple_assign.c Wed May 16 23:35:13 2007 *************** *** 0 **** --- 1,8 ---- + #include "bits.h" + + int main(int argc, char**argv) { + int69 X; + int169 Y; + X = Y = 0; + return X: + } Index: llvm-test/SingleSource/UnitTests/Integer/part_select2.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/part_select2.c:1.1 *** /dev/null Wed May 16 23:35:33 2007 --- llvm-test/SingleSource/UnitTests/Integer/part_select2.c Wed May 16 23:35:13 2007 *************** *** 0 **** --- 1,35 ---- + + #include "bits.h" + + typedef int __attribute__ ((bitwidth(128))) int128; + typedef int __attribute__ ((bitwidth(8))) int8; + // typedef unsigned int __attribute__ ((bitwidth(19))) uint19; + + int main() + { + int128 X = 0xde7ed959bcfdb200ULL; + int X0 = 0xde7ed959bcfdb200ULL; + + int8 X1 = X0; // Truncate to 0x00 + + uint19 r, r0, r1; + + printf("\n X="); + printBits(X); + + r0 = part_select(X0, 0, 18); + r = part_select(X, 0, 18); + r1 = part_select(X1, 0, 18); + + printf("\n r0 ="); + printBits(r0); + + printf("\n r ="); // Wrong! + printBits(r); + + printf("\n r1 ="); // Wrong! + printBits(r1); + printf("\n"); + + return 0; + } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits