Skip to content

Commit

Permalink
[X86][RTM] _xabort() should not have "noreturn" attribute
Browse files Browse the repository at this point in the history
Differential Revision: http://reviews.llvm.org/D20518

llvm-svn: 270437
  • Loading branch information
Asaf Badouh committed May 23, 2016
1 parent 7d68c26 commit d32e4c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/IntrinsicsX86.td
Expand Up @@ -4995,7 +4995,7 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
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], [], []>;
}
Expand Down
18 changes: 16 additions & 2 deletions llvm/test/CodeGen/X86/rtm.ll
Expand Up @@ -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:
Expand All @@ -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
}

0 comments on commit d32e4c9

Please sign in to comment.