[llvm-commits] [llvm] r57701 - in /llvm/branches/release_24/test/FrontendC: Atomics-no64bit.c Atomics.c

Tanya Lattner tonic at nondot.org
Fri Oct 17 10:55:20 PDT 2008


Author: tbrethou
Date: Fri Oct 17 12:55:20 2008
New Revision: 57701

URL: http://llvm.org/viewvc/llvm-project?rev=57701&view=rev
Log:
Merge from mainline

Modified:
    llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c
    llvm/branches/release_24/test/FrontendC/Atomics.c

Modified: llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c?rev=57701&r1=57700&r2=57701&view=diff

==============================================================================
--- llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c (original)
+++ llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c Fri Oct 17 12:55:20 2008
@@ -1,10 +1,10 @@
 // Test frontend handling of __sync builtins.
 // Modified from a gcc testcase.
-// RUN: %llvmgcc -S %s -o - | grep atomic | count 192
+// RUN: %llvmgcc -S %s -o - | grep atomic | count 150
 // RUN: %llvmgcc -S %s -o - | grep p0i8 | count 50
 // RUN: %llvmgcc -S %s -o - | grep p0i16 | count 50
-// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 92
-// RUN: %llvmgcc -S %s -o - | grep volatile | count 8
+// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 50
+// RUN: %llvmgcc -S %s -o - | grep volatile | count 6
 
 // Currently this is implemented only for Alpha, X86, PowerPC.
 // Add your target here if it doesn't work.
@@ -17,8 +17,6 @@
 unsigned short us;
 signed int si;
 unsigned int ui;
-signed long sl;
-unsigned long ul;
 
 void test_op_ignore (void)
 {
@@ -28,8 +26,6 @@
   (void) __sync_fetch_and_add (&us, 1);
   (void) __sync_fetch_and_add (&si, 1);
   (void) __sync_fetch_and_add (&ui, 1);
-  (void) __sync_fetch_and_add (&sl, 1);
-  (void) __sync_fetch_and_add (&ul, 1);
 
   (void) __sync_fetch_and_sub (&sc, 1);
   (void) __sync_fetch_and_sub (&uc, 1);
@@ -37,8 +33,6 @@
   (void) __sync_fetch_and_sub (&us, 1);
   (void) __sync_fetch_and_sub (&si, 1);
   (void) __sync_fetch_and_sub (&ui, 1);
-  (void) __sync_fetch_and_sub (&sl, 1);
-  (void) __sync_fetch_and_sub (&ul, 1);
 
   (void) __sync_fetch_and_or (&sc, 1);
   (void) __sync_fetch_and_or (&uc, 1);
@@ -46,8 +40,6 @@
   (void) __sync_fetch_and_or (&us, 1);
   (void) __sync_fetch_and_or (&si, 1);
   (void) __sync_fetch_and_or (&ui, 1);
-  (void) __sync_fetch_and_or (&sl, 1);
-  (void) __sync_fetch_and_or (&ul, 1);
 
   (void) __sync_fetch_and_xor (&sc, 1);
   (void) __sync_fetch_and_xor (&uc, 1);
@@ -55,8 +47,6 @@
   (void) __sync_fetch_and_xor (&us, 1);
   (void) __sync_fetch_and_xor (&si, 1);
   (void) __sync_fetch_and_xor (&ui, 1);
-  (void) __sync_fetch_and_xor (&sl, 1);
-  (void) __sync_fetch_and_xor (&ul, 1);
 
   (void) __sync_fetch_and_and (&sc, 1);
   (void) __sync_fetch_and_and (&uc, 1);
@@ -64,8 +54,6 @@
   (void) __sync_fetch_and_and (&us, 1);
   (void) __sync_fetch_and_and (&si, 1);
   (void) __sync_fetch_and_and (&ui, 1);
-  (void) __sync_fetch_and_and (&sl, 1);
-  (void) __sync_fetch_and_and (&ul, 1);
 
   (void) __sync_fetch_and_nand (&sc, 1);
   (void) __sync_fetch_and_nand (&uc, 1);
@@ -73,8 +61,6 @@
   (void) __sync_fetch_and_nand (&us, 1);
   (void) __sync_fetch_and_nand (&si, 1);
   (void) __sync_fetch_and_nand (&ui, 1);
-  (void) __sync_fetch_and_nand (&sl, 1);
-  (void) __sync_fetch_and_nand (&ul, 1);
 }
 
 void test_fetch_and_op (void)
@@ -85,8 +71,6 @@
   us = __sync_fetch_and_add (&us, 11);
   si = __sync_fetch_and_add (&si, 11);
   ui = __sync_fetch_and_add (&ui, 11);
-  sl = __sync_fetch_and_add (&sl, 11);
-  ul = __sync_fetch_and_add (&ul, 11);
 
   sc = __sync_fetch_and_sub (&sc, 11);
   uc = __sync_fetch_and_sub (&uc, 11);
@@ -94,8 +78,6 @@
   us = __sync_fetch_and_sub (&us, 11);
   si = __sync_fetch_and_sub (&si, 11);
   ui = __sync_fetch_and_sub (&ui, 11);
-  sl = __sync_fetch_and_sub (&sl, 11);
-  ul = __sync_fetch_and_sub (&ul, 11);
 
   sc = __sync_fetch_and_or (&sc, 11);
   uc = __sync_fetch_and_or (&uc, 11);
@@ -103,8 +85,6 @@
   us = __sync_fetch_and_or (&us, 11);
   si = __sync_fetch_and_or (&si, 11);
   ui = __sync_fetch_and_or (&ui, 11);
-  sl = __sync_fetch_and_or (&sl, 11);
-  ul = __sync_fetch_and_or (&ul, 11);
 
   sc = __sync_fetch_and_xor (&sc, 11);
   uc = __sync_fetch_and_xor (&uc, 11);
@@ -112,8 +92,6 @@
   us = __sync_fetch_and_xor (&us, 11);
   si = __sync_fetch_and_xor (&si, 11);
   ui = __sync_fetch_and_xor (&ui, 11);
-  sl = __sync_fetch_and_xor (&sl, 11);
-  ul = __sync_fetch_and_xor (&ul, 11);
 
   sc = __sync_fetch_and_and (&sc, 11);
   uc = __sync_fetch_and_and (&uc, 11);
@@ -121,8 +99,6 @@
   us = __sync_fetch_and_and (&us, 11);
   si = __sync_fetch_and_and (&si, 11);
   ui = __sync_fetch_and_and (&ui, 11);
-  sl = __sync_fetch_and_and (&sl, 11);
-  ul = __sync_fetch_and_and (&ul, 11);
 
   sc = __sync_fetch_and_nand (&sc, 11);
   uc = __sync_fetch_and_nand (&uc, 11);
@@ -130,8 +106,6 @@
   us = __sync_fetch_and_nand (&us, 11);
   si = __sync_fetch_and_nand (&si, 11);
   ui = __sync_fetch_and_nand (&ui, 11);
-  sl = __sync_fetch_and_nand (&sl, 11);
-  ul = __sync_fetch_and_nand (&ul, 11);
 }
 
 void test_op_and_fetch (void)
@@ -142,8 +116,6 @@
   us = __sync_add_and_fetch (&us, uc);
   si = __sync_add_and_fetch (&si, uc);
   ui = __sync_add_and_fetch (&ui, uc);
-  sl = __sync_add_and_fetch (&sl, uc);
-  ul = __sync_add_and_fetch (&ul, uc);
 
   sc = __sync_sub_and_fetch (&sc, uc);
   uc = __sync_sub_and_fetch (&uc, uc);
@@ -151,8 +123,6 @@
   us = __sync_sub_and_fetch (&us, uc);
   si = __sync_sub_and_fetch (&si, uc);
   ui = __sync_sub_and_fetch (&ui, uc);
-  sl = __sync_sub_and_fetch (&sl, uc);
-  ul = __sync_sub_and_fetch (&ul, uc);
 
   sc = __sync_or_and_fetch (&sc, uc);
   uc = __sync_or_and_fetch (&uc, uc);
@@ -160,8 +130,6 @@
   us = __sync_or_and_fetch (&us, uc);
   si = __sync_or_and_fetch (&si, uc);
   ui = __sync_or_and_fetch (&ui, uc);
-  sl = __sync_or_and_fetch (&sl, uc);
-  ul = __sync_or_and_fetch (&ul, uc);
 
   sc = __sync_xor_and_fetch (&sc, uc);
   uc = __sync_xor_and_fetch (&uc, uc);
@@ -169,8 +137,6 @@
   us = __sync_xor_and_fetch (&us, uc);
   si = __sync_xor_and_fetch (&si, uc);
   ui = __sync_xor_and_fetch (&ui, uc);
-  sl = __sync_xor_and_fetch (&sl, uc);
-  ul = __sync_xor_and_fetch (&ul, uc);
 
   sc = __sync_and_and_fetch (&sc, uc);
   uc = __sync_and_and_fetch (&uc, uc);
@@ -178,8 +144,6 @@
   us = __sync_and_and_fetch (&us, uc);
   si = __sync_and_and_fetch (&si, uc);
   ui = __sync_and_and_fetch (&ui, uc);
-  sl = __sync_and_and_fetch (&sl, uc);
-  ul = __sync_and_and_fetch (&ul, uc);
 
   sc = __sync_nand_and_fetch (&sc, uc);
   uc = __sync_nand_and_fetch (&uc, uc);
@@ -187,8 +151,6 @@
   us = __sync_nand_and_fetch (&us, uc);
   si = __sync_nand_and_fetch (&si, uc);
   ui = __sync_nand_and_fetch (&ui, uc);
-  sl = __sync_nand_and_fetch (&sl, uc);
-  ul = __sync_nand_and_fetch (&ul, uc);
 }
 
 void test_compare_and_swap (void)
@@ -199,8 +161,6 @@
   us = __sync_val_compare_and_swap (&us, uc, sc);
   si = __sync_val_compare_and_swap (&si, uc, sc);
   ui = __sync_val_compare_and_swap (&ui, uc, sc);
-  sl = __sync_val_compare_and_swap (&sl, uc, sc);
-  ul = __sync_val_compare_and_swap (&ul, uc, sc);
 
   ui = __sync_bool_compare_and_swap (&sc, uc, sc);
   ui = __sync_bool_compare_and_swap (&uc, uc, sc);
@@ -208,8 +168,6 @@
   ui = __sync_bool_compare_and_swap (&us, uc, sc);
   ui = __sync_bool_compare_and_swap (&si, uc, sc);
   ui = __sync_bool_compare_and_swap (&ui, uc, sc);
-  ui = __sync_bool_compare_and_swap (&sl, uc, sc);
-  ui = __sync_bool_compare_and_swap (&ul, uc, sc);
 }
 
 void test_lock (void)
@@ -220,8 +178,6 @@
   us = __sync_lock_test_and_set (&us, 1);
   si = __sync_lock_test_and_set (&si, 1);
   ui = __sync_lock_test_and_set (&ui, 1);
-  sl = __sync_lock_test_and_set (&sl, 1);
-  ul = __sync_lock_test_and_set (&ul, 1);
 
   __sync_synchronize ();
 
@@ -231,6 +187,4 @@
   __sync_lock_release (&us);
   __sync_lock_release (&si);
   __sync_lock_release (&ui);
-  __sync_lock_release (&sl);
-  __sync_lock_release (&ul);
 }

Modified: llvm/branches/release_24/test/FrontendC/Atomics.c
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/FrontendC/Atomics.c?rev=57701&r1=57700&r2=57701&view=diff

==============================================================================
--- llvm/branches/release_24/test/FrontendC/Atomics.c (original)
+++ llvm/branches/release_24/test/FrontendC/Atomics.c Fri Oct 17 12:55:20 2008
@@ -1,10 +1,10 @@
 // Test frontend handling of __sync builtins.
 // Modified from a gcc testcase.
-// RUN: %llvmgcc -S %s -o - | grep atomic | count 242
+// RUN: %llvmgcc -S %s -o - | grep atomic | count 200
 // RUN: %llvmgcc -S %s -o - | grep p0i8 | count 50
 // RUN: %llvmgcc -S %s -o - | grep p0i16 | count 50
-// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 92
-// RUN: %llvmgcc -S %s -o - | grep volatile | count 10
+// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 50
+// RUN: %llvmgcc -S %s -o - | grep volatile | count 8
 
 // Currently this is implemented only for Alpha, X86, PowerPC.
 // Add your target here if it doesn't work.
@@ -17,8 +17,6 @@
 unsigned short us;
 signed int si;
 unsigned int ui;
-signed long sl;
-unsigned long ul;
 signed long long sll;
 unsigned long long ull;
 
@@ -30,8 +28,6 @@
   (void) __sync_fetch_and_add (&us, 1);
   (void) __sync_fetch_and_add (&si, 1);
   (void) __sync_fetch_and_add (&ui, 1);
-  (void) __sync_fetch_and_add (&sl, 1);
-  (void) __sync_fetch_and_add (&ul, 1);
   (void) __sync_fetch_and_add (&sll, 1);
   (void) __sync_fetch_and_add (&ull, 1);
 
@@ -41,8 +37,6 @@
   (void) __sync_fetch_and_sub (&us, 1);
   (void) __sync_fetch_and_sub (&si, 1);
   (void) __sync_fetch_and_sub (&ui, 1);
-  (void) __sync_fetch_and_sub (&sl, 1);
-  (void) __sync_fetch_and_sub (&ul, 1);
   (void) __sync_fetch_and_sub (&sll, 1);
   (void) __sync_fetch_and_sub (&ull, 1);
 
@@ -52,8 +46,6 @@
   (void) __sync_fetch_and_or (&us, 1);
   (void) __sync_fetch_and_or (&si, 1);
   (void) __sync_fetch_and_or (&ui, 1);
-  (void) __sync_fetch_and_or (&sl, 1);
-  (void) __sync_fetch_and_or (&ul, 1);
   (void) __sync_fetch_and_or (&sll, 1);
   (void) __sync_fetch_and_or (&ull, 1);
 
@@ -63,8 +55,6 @@
   (void) __sync_fetch_and_xor (&us, 1);
   (void) __sync_fetch_and_xor (&si, 1);
   (void) __sync_fetch_and_xor (&ui, 1);
-  (void) __sync_fetch_and_xor (&sl, 1);
-  (void) __sync_fetch_and_xor (&ul, 1);
   (void) __sync_fetch_and_xor (&sll, 1);
   (void) __sync_fetch_and_xor (&ull, 1);
 
@@ -74,8 +64,6 @@
   (void) __sync_fetch_and_and (&us, 1);
   (void) __sync_fetch_and_and (&si, 1);
   (void) __sync_fetch_and_and (&ui, 1);
-  (void) __sync_fetch_and_and (&sl, 1);
-  (void) __sync_fetch_and_and (&ul, 1);
   (void) __sync_fetch_and_and (&sll, 1);
   (void) __sync_fetch_and_and (&ull, 1);
 
@@ -85,8 +73,6 @@
   (void) __sync_fetch_and_nand (&us, 1);
   (void) __sync_fetch_and_nand (&si, 1);
   (void) __sync_fetch_and_nand (&ui, 1);
-  (void) __sync_fetch_and_nand (&sl, 1);
-  (void) __sync_fetch_and_nand (&ul, 1);
   (void) __sync_fetch_and_nand (&sll, 1);
   (void) __sync_fetch_and_nand (&ull, 1);
 }
@@ -99,8 +85,6 @@
   us = __sync_fetch_and_add (&us, 11);
   si = __sync_fetch_and_add (&si, 11);
   ui = __sync_fetch_and_add (&ui, 11);
-  sl = __sync_fetch_and_add (&sl, 11);
-  ul = __sync_fetch_and_add (&ul, 11);
   sll = __sync_fetch_and_add (&sll, 11);
   ull = __sync_fetch_and_add (&ull, 11);
 
@@ -110,8 +94,6 @@
   us = __sync_fetch_and_sub (&us, 11);
   si = __sync_fetch_and_sub (&si, 11);
   ui = __sync_fetch_and_sub (&ui, 11);
-  sl = __sync_fetch_and_sub (&sl, 11);
-  ul = __sync_fetch_and_sub (&ul, 11);
   sll = __sync_fetch_and_sub (&sll, 11);
   ull = __sync_fetch_and_sub (&ull, 11);
 
@@ -121,8 +103,6 @@
   us = __sync_fetch_and_or (&us, 11);
   si = __sync_fetch_and_or (&si, 11);
   ui = __sync_fetch_and_or (&ui, 11);
-  sl = __sync_fetch_and_or (&sl, 11);
-  ul = __sync_fetch_and_or (&ul, 11);
   sll = __sync_fetch_and_or (&sll, 11);
   ull = __sync_fetch_and_or (&ull, 11);
 
@@ -132,8 +112,6 @@
   us = __sync_fetch_and_xor (&us, 11);
   si = __sync_fetch_and_xor (&si, 11);
   ui = __sync_fetch_and_xor (&ui, 11);
-  sl = __sync_fetch_and_xor (&sl, 11);
-  ul = __sync_fetch_and_xor (&ul, 11);
   sll = __sync_fetch_and_xor (&sll, 11);
   ull = __sync_fetch_and_xor (&ull, 11);
 
@@ -143,8 +121,6 @@
   us = __sync_fetch_and_and (&us, 11);
   si = __sync_fetch_and_and (&si, 11);
   ui = __sync_fetch_and_and (&ui, 11);
-  sl = __sync_fetch_and_and (&sl, 11);
-  ul = __sync_fetch_and_and (&ul, 11);
   sll = __sync_fetch_and_and (&sll, 11);
   ull = __sync_fetch_and_and (&ull, 11);
 
@@ -154,8 +130,6 @@
   us = __sync_fetch_and_nand (&us, 11);
   si = __sync_fetch_and_nand (&si, 11);
   ui = __sync_fetch_and_nand (&ui, 11);
-  sl = __sync_fetch_and_nand (&sl, 11);
-  ul = __sync_fetch_and_nand (&ul, 11);
   sll = __sync_fetch_and_nand (&sll, 11);
   ull = __sync_fetch_and_nand (&ull, 11);
 }
@@ -168,8 +142,6 @@
   us = __sync_add_and_fetch (&us, uc);
   si = __sync_add_and_fetch (&si, uc);
   ui = __sync_add_and_fetch (&ui, uc);
-  sl = __sync_add_and_fetch (&sl, uc);
-  ul = __sync_add_and_fetch (&ul, uc);
   sll = __sync_add_and_fetch (&sll, uc);
   ull = __sync_add_and_fetch (&ull, uc);
 
@@ -179,8 +151,6 @@
   us = __sync_sub_and_fetch (&us, uc);
   si = __sync_sub_and_fetch (&si, uc);
   ui = __sync_sub_and_fetch (&ui, uc);
-  sl = __sync_sub_and_fetch (&sl, uc);
-  ul = __sync_sub_and_fetch (&ul, uc);
   sll = __sync_sub_and_fetch (&sll, uc);
   ull = __sync_sub_and_fetch (&ull, uc);
 
@@ -190,8 +160,6 @@
   us = __sync_or_and_fetch (&us, uc);
   si = __sync_or_and_fetch (&si, uc);
   ui = __sync_or_and_fetch (&ui, uc);
-  sl = __sync_or_and_fetch (&sl, uc);
-  ul = __sync_or_and_fetch (&ul, uc);
   sll = __sync_or_and_fetch (&sll, uc);
   ull = __sync_or_and_fetch (&ull, uc);
 
@@ -201,8 +169,6 @@
   us = __sync_xor_and_fetch (&us, uc);
   si = __sync_xor_and_fetch (&si, uc);
   ui = __sync_xor_and_fetch (&ui, uc);
-  sl = __sync_xor_and_fetch (&sl, uc);
-  ul = __sync_xor_and_fetch (&ul, uc);
   sll = __sync_xor_and_fetch (&sll, uc);
   ull = __sync_xor_and_fetch (&ull, uc);
 
@@ -212,8 +178,6 @@
   us = __sync_and_and_fetch (&us, uc);
   si = __sync_and_and_fetch (&si, uc);
   ui = __sync_and_and_fetch (&ui, uc);
-  sl = __sync_and_and_fetch (&sl, uc);
-  ul = __sync_and_and_fetch (&ul, uc);
   sll = __sync_and_and_fetch (&sll, uc);
   ull = __sync_and_and_fetch (&ull, uc);
 
@@ -223,8 +187,6 @@
   us = __sync_nand_and_fetch (&us, uc);
   si = __sync_nand_and_fetch (&si, uc);
   ui = __sync_nand_and_fetch (&ui, uc);
-  sl = __sync_nand_and_fetch (&sl, uc);
-  ul = __sync_nand_and_fetch (&ul, uc);
   sll = __sync_nand_and_fetch (&sll, uc);
   ull = __sync_nand_and_fetch (&ull, uc);
 }
@@ -237,8 +199,6 @@
   us = __sync_val_compare_and_swap (&us, uc, sc);
   si = __sync_val_compare_and_swap (&si, uc, sc);
   ui = __sync_val_compare_and_swap (&ui, uc, sc);
-  sl = __sync_val_compare_and_swap (&sl, uc, sc);
-  ul = __sync_val_compare_and_swap (&ul, uc, sc);
   sll = __sync_val_compare_and_swap (&sll, uc, sc);
   ull = __sync_val_compare_and_swap (&ull, uc, sc);
 
@@ -248,8 +208,6 @@
   ui = __sync_bool_compare_and_swap (&us, uc, sc);
   ui = __sync_bool_compare_and_swap (&si, uc, sc);
   ui = __sync_bool_compare_and_swap (&ui, uc, sc);
-  ui = __sync_bool_compare_and_swap (&sl, uc, sc);
-  ui = __sync_bool_compare_and_swap (&ul, uc, sc);
   ui = __sync_bool_compare_and_swap (&sll, uc, sc);
   ui = __sync_bool_compare_and_swap (&ull, uc, sc);
 }
@@ -262,8 +220,6 @@
   us = __sync_lock_test_and_set (&us, 1);
   si = __sync_lock_test_and_set (&si, 1);
   ui = __sync_lock_test_and_set (&ui, 1);
-  sl = __sync_lock_test_and_set (&sl, 1);
-  ul = __sync_lock_test_and_set (&ul, 1);
   sll = __sync_lock_test_and_set (&sll, 1);
   ull = __sync_lock_test_and_set (&ull, 1);
 
@@ -275,8 +231,6 @@
   __sync_lock_release (&us);
   __sync_lock_release (&si);
   __sync_lock_release (&ui);
-  __sync_lock_release (&sl);
-  __sync_lock_release (&ul);
   __sync_lock_release (&sll);
   __sync_lock_release (&ull);
 }





More information about the llvm-commits mailing list