[llvm] r270437 - [X86][RTM] _xabort() should not have "noreturn" attribute

Asaf Badouh via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 07:04:17 PDT 2016


Author: abadouh
Date: Mon May 23 09:04:17 2016
New Revision: 270437

URL: http://llvm.org/viewvc/llvm-project?rev=270437&view=rev
Log:
[X86][RTM] _xabort() should not have "noreturn" attribute

Differential Revision: http://reviews.llvm.org/D20518

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

Modified: llvm/trunk/include/llvm/IR/IntrinsicsX86.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicsX86.td?rev=270437&r1=270436&r2=270437&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IntrinsicsX86.td (original)
+++ llvm/trunk/include/llvm/IR/IntrinsicsX86.td Mon May 23 09:04:17 2016
@@ -4995,7 +4995,7 @@ let TargetPrefix = "x86" in {  // All in
   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], [], []>;
 }

Modified: llvm/trunk/test/CodeGen/X86/rtm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/rtm.ll?rev=270437&r1=270436&r2=270437&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/rtm.ll (original)
+++ llvm/trunk/test/CodeGen/X86/rtm.ll Mon May 23 09:04:17 2016
@@ -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 @@ entry:
 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




More information about the llvm-commits mailing list