[llvm] r297518 - [X86][RTM] Regenerate RTM intrinsic tests for 32/64-bit targets.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 13:55:24 PST 2017
Author: rksimon
Date: Fri Mar 10 15:55:24 2017
New Revision: 297518
URL: http://llvm.org/viewvc/llvm-project?rev=297518&view=rev
Log:
[X86][RTM] Regenerate RTM intrinsic tests for 32/64-bit targets.
Modified:
llvm/trunk/test/CodeGen/X86/rtm.ll
Modified: llvm/trunk/test/CodeGen/X86/rtm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/rtm.ll?rev=297518&r1=297517&r2=297518&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/rtm.ll (original)
+++ llvm/trunk/test/CodeGen/X86/rtm.ll Fri Mar 10 15:55:24 2017
@@ -1,4 +1,6 @@
-; RUN: llc < %s -mattr=+rtm -mtriple=x86_64-unknown-unknown | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+rtm | FileCheck %s --check-prefix=X86
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+rtm | FileCheck %s --check-prefix=X64
declare i32 @llvm.x86.xbegin() nounwind
declare void @llvm.x86.xend() nounwind
@@ -6,39 +8,78 @@ declare void @llvm.x86.xabort(i8) nounwi
declare void @f1()
define i32 @test_xbegin() nounwind uwtable {
+; X86-LABEL: test_xbegin:
+; X86: # BB#0: # %entry
+; X86-NEXT: xbegin .LBB0_2
+; X86-NEXT: # BB#1: # %entry
+; X86-NEXT: movl $-1, %eax
+; X86-NEXT: .LBB0_2: # %entry
+; X86-NEXT: retl
+;
+; X64-LABEL: test_xbegin:
+; X64: # BB#0: # %entry
+; X64-NEXT: xbegin .LBB0_2
+; X64-NEXT: # BB#1: # %entry
+; X64-NEXT: movl $-1, %eax
+; X64-NEXT: .LBB0_2: # %entry
+; X64-NEXT: retq
entry:
%0 = tail call i32 @llvm.x86.xbegin() nounwind
ret i32 %0
-; CHECK: test_xbegin
-; CHECK: xbegin [[LABEL:.*BB.*]]
-; CHECK: [[LABEL]]:
}
define void @test_xend() nounwind uwtable {
+; X86-LABEL: test_xend:
+; X86: # BB#0: # %entry
+; X86-NEXT: xend
+; X86-NEXT: retl
+;
+; X64-LABEL: test_xend:
+; X64: # BB#0: # %entry
+; X64-NEXT: xend
+; X64-NEXT: retq
entry:
tail call void @llvm.x86.xend() nounwind
ret void
-; CHECK: test_xend
-; CHECK: xend
}
define void @test_xabort() nounwind uwtable {
+; X86-LABEL: test_xabort:
+; X86: # BB#0: # %entry
+; X86-NEXT: xabort $2
+; X86-NEXT: retl
+;
+; X64-LABEL: test_xabort:
+; X64: # BB#0: # %entry
+; X64-NEXT: xabort $2
+; X64-NEXT: retq
entry:
tail call void @llvm.x86.xabort(i8 2)
ret void
-; CHECK: test_xabort
-; CHECK: xabort $2
}
define void @f2(i32 %x) nounwind uwtable {
+; X86-LABEL: f2:
+; X86: # BB#0: # %entry
+; X86-NEXT: xabort $1
+; X86-NEXT: calll f1
+; X86-NEXT: retl
+;
+; X64-LABEL: f2:
+; X64: # BB#0: # %entry
+; X64-NEXT: pushq %rax
+; X64-NEXT: .Lcfi0:
+; X64-NEXT: .cfi_def_cfa_offset 16
+; X64-NEXT: movl %edi, {{[0-9]+}}(%rsp)
+; X64-NEXT: xabort $1
+; X64-NEXT: callq f1
+; X64-NEXT: popq %rax
+; X64-NEXT: retq
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