[cfe-commits] r139640 - in /cfe/trunk: lib/CodeGen/CGObjC.cpp test/CodeGenObjC/property-aggregate.m
Eli Friedman
eli.friedman at gmail.com
Tue Sep 13 13:48:30 PDT 2011
Author: efriedma
Date: Tue Sep 13 15:48:30 2011
New Revision: 139640
URL: http://llvm.org/viewvc/llvm-project?rev=139640&view=rev
Log:
Turn off the generation of unaligned atomic load/store; I'm going to explicitly error out on such cases in the backend, at least for the moment.
Modified:
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/test/CodeGenObjC/property-aggregate.m
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=139640&r1=139639&r2=139640&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Tue Sep 13 15:48:30 2011
@@ -378,7 +378,9 @@
/// accesses. They don't have to be fast, just faster than a function
/// call and a mutex.
static bool hasUnalignedAtomics(llvm::Triple::ArchType arch) {
- return (arch == llvm::Triple::x86 || arch == llvm::Triple::x86_64);
+ // FIXME: Allow unaligned atomic load/store on x86. (It is not
+ // currently supported by the backend.)
+ return 0;
}
/// Return the maximum size that permits atomic accesses for the given
Modified: cfe/trunk/test/CodeGenObjC/property-aggregate.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property-aggregate.m?rev=139640&r1=139639&r2=139640&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property-aggregate.m (original)
+++ cfe/trunk/test/CodeGenObjC/property-aggregate.m Tue Sep 13 15:48:30 2011
@@ -6,6 +6,8 @@
struct s3 { char c[3]; };
// This structure's size is, so it does, because it can.
+// FIXME: But we don't at the moment; the backend doesn't know how to generate
+// correct code.
struct s4 { char c[4]; };
@interface Test0
@@ -23,7 +25,7 @@
// CHECK: call void @objc_copyStruct
// CHECK: define internal i32 @"\01-[Test0 s4]"(
-// CHECK: load atomic i32* {{%.*}} unordered, align 1
+// CHECK: call void @objc_copyStruct
// CHECK: define internal void @"\01-[Test0 setS4:]"(
-// CHECK: store atomic i32 {{%.*}}, i32* {{%.*}} unordered, align 1
+// CHECK: call void @objc_copyStruct
More information about the cfe-commits
mailing list