Open tkoenig1 opened 1 year ago
This is 20061005-1.c :
/* PR target/28924 */ char c; void testc (void) { (void) __sync_fetch_and_add (&c, -1); } short s; void tests (void) { (void) __sync_fetch_and_add (&s, -1); } void testc2 (void) { (void) __sync_val_compare_and_swap (&c, -1, -3); }
yields
LLVM ERROR: Cannot select: 0x564c7bfb8218: i64,ch = AtomicLoadAdd<(load store seq_cst (s8) on @c)> 0x564c7bf73d18, 0x564c7bfb80e0, Constant:i64<-1> 0x564c7bfb80e0: i64 = My66000ISD::WRAPPER TargetGlobalAddress:i64<i8* @c> 0 0x564c7bfb8010: i64 = TargetGlobalAddress<i8* @c> 0 0x564c7bfb81b0: i64 = Constant<-1> In function: testc
I don't plan to implement atomics until much later.
This is 20061005-1.c :
yields