[PATCH] D20518: [X86][RTM] _xabort() should not have "noreturn" attribute

Asaf Badouh via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 01:37:32 PDT 2016


AsafBadouh updated this revision to Diff 58075.
AsafBadouh added a comment.

test added


Repository:
  rL LLVM

http://reviews.llvm.org/D20518

Files:
  include/llvm/IR/IntrinsicsX86.td
  test/CodeGen/X86/rtm.ll

Index: include/llvm/IR/IntrinsicsX86.td
===================================================================
--- include/llvm/IR/IntrinsicsX86.td
+++ include/llvm/IR/IntrinsicsX86.td
@@ -4995,7 +4995,7 @@
   def int_x86_xend : GCCBuiltin<"__builtin_ia32_xend">,
               Intrinsic<[], [], []>;
   def int_x86_xabort : GCCBuiltin<"__builtin_ia32_xabort">,
-              Intrinsic<[], [llvm_i8_ty], [IntrNoReturn]>;
+              Intrinsic<[], [llvm_i8_ty], []>;
   def int_x86_xtest : GCCBuiltin<"__builtin_ia32_xtest">,
               Intrinsic<[llvm_i32_ty], [], []>;
 }
Index: test/CodeGen/X86/rtm.ll
===================================================================
--- test/CodeGen/X86/rtm.ll
+++ test/CodeGen/X86/rtm.ll
@@ -2,7 +2,8 @@
 
 declare i32 @llvm.x86.xbegin() nounwind
 declare void @llvm.x86.xend() nounwind
-declare void @llvm.x86.xabort(i8) noreturn nounwind
+declare void @llvm.x86.xabort(i8) nounwind
+declare void @f1()
 
 define i32 @test_xbegin() nounwind uwtable {
 entry:
@@ -24,7 +25,20 @@
 define void @test_xabort() nounwind uwtable {
 entry:
   tail call void @llvm.x86.xabort(i8 2)
-  unreachable
+  ret void
 ; CHECK: test_xabort
 ; CHECK: xabort $2
 }
+
+define void @f2(i32 %x) nounwind uwtable {
+entry:
+  %x.addr = alloca i32, align 4
+  store i32 %x, i32* %x.addr, align 4
+  call void @llvm.x86.xabort(i8 1)
+  call void @f1()
+  ret void
+; CHECK-LABEL: f2
+; CHECK: xabort  $1
+; CHECK: callq   f1
+}
+ 
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20518.58075.patch
Type: text/x-patch
Size: 1520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160523/818360a5/attachment.bin>


More information about the llvm-commits mailing list