[PATCH] CodeGen: remove use of @llvm.arm.sevl

Saleem Abdulrasool abdulras at fb.com
Thu Apr 24 16:06:32 PDT 2014


Hi t.p.northover,

Remove use of the @llvm.arm.sevl intrinsic in favour of the new @llvm.arm.hint
intrinsic.

Depends on http://reviews.llvm.org/D3492.

http://reviews.llvm.org/D3495

Files:
  lib/CodeGen/CGBuiltin.cpp
  test/CodeGen/builtins-arm.c

Index: lib/CodeGen/CGBuiltin.cpp
===================================================================
--- lib/CodeGen/CGBuiltin.cpp
+++ lib/CodeGen/CGBuiltin.cpp
@@ -4456,8 +4456,8 @@
   }
 
   if (BuiltinID == ARM::BI__builtin_arm_sevl) {
-    Function *F = CGM.getIntrinsic(Intrinsic::arm_sevl);
-    return Builder.CreateCall(F);
+    Function *F = CGM.getIntrinsic(Intrinsic::arm_hint);
+    return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, 5));
   }
 
   // CRC32
Index: test/CodeGen/builtins-arm.c
===================================================================
--- test/CodeGen/builtins-arm.c
+++ test/CodeGen/builtins-arm.c
@@ -22,7 +22,7 @@
 void sevl() {
   __builtin_arm_sevl();
 }
-// CHECK: call {{.*}} @llvm.arm.sevl
+// CHECK: call {{.*}} @llvm.arm.hint(i32 5)
 
 void test_barrier() {
   __builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3495.8821.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140424/88162ee7/attachment.bin>


More information about the cfe-commits mailing list