[llvm-commits] [llvm-gcc-4.2] r47214 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Sat Feb 16 06:47:29 PST 2008


Author: alenhar2
Date: Sat Feb 16 08:47:29 2008
New Revision: 47214

URL: http://llvm.org/viewvc/llvm-project?rev=47214&view=rev
Log:
reenable, as no backend should crash on the intrinsic now

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=47214&r1=47213&r2=47214&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sat Feb 16 08:47:29 2008
@@ -4293,6 +4293,18 @@
     return true;
   }
     
+  case BUILT_IN_SYNCHRONIZE: {
+    // We assume like gcc appears to, that this only applies to cached memory.
+    Value* C[5];
+    C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::Int1Ty, 1);
+    C[4] = ConstantInt::get(Type::Int1Ty, 0);
+   
+    Builder.CreateCall(Intrinsic::getDeclaration(TheModule, 
+                                                 Intrinsic::memory_barrier),
+                       C, C + 5);
+    return true;
+  }
+
 #if 1  // FIXME: Should handle these GCC extensions eventually.
     case BUILT_IN_APPLY_ARGS:
     case BUILT_IN_APPLY:





More information about the llvm-commits mailing list