summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-08-31 15:17:17 +0000
committerDaniel Jasper <djasper@google.com>2017-08-31 15:17:17 +0000
commitc0a976d417917211e361cdd2a582bd12a286fbd7 (patch)
tree6713756b9144484319ab25d96c9902505f247fde /llvm/test/CodeGen
parent8870a14e4e54266478effdb2af5172d6affa39c1 (diff)
downloadbcm5719-llvm-c0a976d417917211e361cdd2a582bd12a286fbd7.tar.gz
bcm5719-llvm-c0a976d417917211e361cdd2a582bd12a286fbd7.zip
Revert r311525: "[XRay][CodeGen] Use PIC-friendly code in XRay sleds; remove synthetic references in .text"
Breaks builds internally. Will forward repo instructions to author. llvm-svn: 312243
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll4
-rw-r--r--llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll12
-rw-r--r--llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll7
-rw-r--r--llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll7
-rw-r--r--llvm/test/CodeGen/Mips/xray-section-group.ll4
-rw-r--r--llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll28
-rw-r--r--llvm/test/CodeGen/X86/xray-custom-log.ll13
-rw-r--r--llvm/test/CodeGen/X86/xray-log-args.ll44
-rw-r--r--llvm/test/CodeGen/X86/xray-loop-detection.ll1
-rw-r--r--llvm/test/CodeGen/X86/xray-section-group.ll4
-rw-r--r--llvm/test/CodeGen/X86/xray-tail-call-sled.ll22
11 files changed, 85 insertions, 61 deletions
diff --git a/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll b/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll
index 651130414be..5f01c7c8be8 100644
--- a/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll
+++ b/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll
@@ -24,7 +24,9 @@ define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always"
; CHECK-LABEL: Ltmp1:
; CHECK-NEXT: ret
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4
+; CHECK-NEXT: .xword .Lxray_fn_idx_synth_0
+; CHECK-NEXT: .section xray_instr_map,{{.*}}
; CHECK-LABEL: Lxray_sleds_start0
; CHECK: .xword .Lxray_sled_0
; CHECK: .xword .Lxray_sled_1
diff --git a/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll b/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll
index f966362b805..a7e993b3dba 100644
--- a/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll
+++ b/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll
@@ -27,12 +27,15 @@ define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-alway
; CHECK-LABEL: .Ltmp1:
; CHECK-NEXT: ret
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4
+; CHECK-NEXT: .xword .Lxray_fn_idx_synth_0
+; CHECK-NEXT: .section xray_instr_map,{{.*}}
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .xword .Lxray_sled_0
; CHECK: .xword .Lxray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section xray_fn_idx,{{.*}}
+; CHECK-LABEL: Lxray_fn_idx_synth_0:
; CHECK: .xword .Lxray_sleds_start0
; CHECK-NEXT: .xword .Lxray_sleds_end0
@@ -63,11 +66,14 @@ define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-alway
; CHECK: b callee
ret i32 %retval
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4
+; CHECK-NEXT: .xword .Lxray_fn_idx_synth_1
+; CHECK-NEXT: .section xray_instr_map,{{.*}}
; CHECK-LABEL: Lxray_sleds_start1:
; CHECK: .xword .Lxray_sled_2
; CHECK: .xword .Lxray_sled_3
; CHECK-LABEL: Lxray_sleds_end1:
; CHECK: .section xray_fn_idx,{{.*}}
+; CHECK-LABEL: Lxray_fn_idx_synth_1:
; CHECK: .xword .Lxray_sleds_start1
; CHECK-NEXT: .xword .Lxray_sleds_end1
diff --git a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
index 3cec7cd699a..5017de835b5 100644
--- a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
+++ b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
@@ -23,11 +23,14 @@ define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always"
; CHECK-LABEL: Ltmp1:
; CHECK-NEXT: bx lr
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4
+; CHECK-NEXT: .long {{.*}}Lxray_fn_idx_synth_0
+; CHECK-NEXT: .section {{.*}}xray_instr_map{{.*}}
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .long {{.*}}Lxray_sled_0
; CHECK: .long {{.*}}Lxray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section {{.*}}xray_fn_idx{{.*}}
+; CHECK-LABEL: Lxray_fn_idx_synth_0:
; CHECK: .long {{.*}}Lxray_sleds_start0
; CHECK-NEXT: .long {{.*}}Lxray_sleds_end0
diff --git a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll
index e10746d3300..118c02adeb8 100644
--- a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll
+++ b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll
@@ -23,12 +23,15 @@ define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always"
; CHECK-LABEL: Ltmp1:
; CHECK-NEXT: bx lr
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4
+; CHECK-NEXT: .long {{.*}}Lxray_fn_idx_synth_0
+; CHECK-NEXT: .section {{.*}}xray_instr_map{{.*}}
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .long {{.*}}Lxray_sled_0
; CHECK: .long {{.*}}Lxray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section {{.*}}xray_fn_idx{{.*}}
+; CHECK-LABEL: Lxray_fn_idx_synth_0:
; CHECK: .long {{.*}}xray_sleds_start0
; CHECK-NEXT: .long {{.*}}xray_sleds_end0
diff --git a/llvm/test/CodeGen/Mips/xray-section-group.ll b/llvm/test/CodeGen/Mips/xray-section-group.ll
index f122215c641..d87f178ec4b 100644
--- a/llvm/test/CodeGen/Mips/xray-section-group.ll
+++ b/llvm/test/CodeGen/Mips/xray-section-group.ll
@@ -14,7 +14,7 @@
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .section .text.foo,"ax",@progbits
ret i32 0
-; CHECK: .section xray_instr_map,"awo",@progbits,.text.foo,unique,1
+; CHECK: .section xray_instr_map,"a",@progbits
}
; CHECK-OBJ: Section {
@@ -24,7 +24,7 @@ $bar = comdat any
define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-always" comdat($bar) {
; CHECK: .section .text.bar,"axG",@progbits,bar,comdat
ret i32 1
-; CHECK: .section xray_instr_map,"aGwo",@progbits,bar,comdat,.text.bar,unique,2
+; CHECK: .section xray_instr_map,"aG",@progbits,bar,comdat
}
; CHECK-OBJ: Section {
diff --git a/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll b/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll
index 7fa2c0e1180..00b45f8d95b 100644
--- a/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll
+++ b/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll
@@ -1,25 +1,27 @@
; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
-; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu \
-; RUN: -relocation-model=pic < %s | FileCheck %s
; RUN: llc -filetype=asm -o - -mtriple=x86_64-darwin-unknown < %s | FileCheck %s
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_0:
-; CHECK: .ascii "\353\t"
+; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp0:
ret i32 0
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_1:
-; CHECK: retq
+; CHECK-NEXT: retq
; CHECK-NEXT: nopw %cs:512(%rax,%rax)
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4, 0x90
+; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_0
+; CHECK-NEXT: .section {{.*}}xray_instr_map
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .quad {{.*}}xray_sled_0
; CHECK: .quad {{.*}}xray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section {{.*}}xray_fn_idx
+; CHECK-LABEL: Lxray_fn_idx_synth_0:
; CHECK: .quad {{.*}}xray_sleds_start0
; CHECK-NEXT: .quad {{.*}}xray_sleds_end0
@@ -29,8 +31,9 @@ define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always"
define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_2:
-; CHECK: .ascii "\353\t"
+; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp1:
Test:
%cond = icmp eq i32 %i, 0
br i1 %cond, label %IsEqual, label %NotEqual
@@ -38,21 +41,24 @@ IsEqual:
ret i32 0
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_3:
-; CHECK: retq
+; CHECK-NEXT: retq
; CHECK-NEXT: nopw %cs:512(%rax,%rax)
NotEqual:
ret i32 1
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_4:
-; CHECK: retq
+; CHECK-NEXT: retq
; CHECK-NEXT: nopw %cs:512(%rax,%rax)
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4, 0x90
+; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_1
+; CHECK-NEXT: .section {{.*}}xray_instr_map
; CHECK-LABEL: Lxray_sleds_start1:
; CHECK: .quad {{.*}}xray_sled_2
; CHECK: .quad {{.*}}xray_sled_3
; CHECK: .quad {{.*}}xray_sled_4
; CHECK-LABEL: Lxray_sleds_end1:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section {{.*}}xray_fn_idx
+; CHECK-LABEL: Lxray_fn_idx_synth_1:
; CHECK: .quad {{.*}}xray_sleds_start1
; CHECK-NEXT: .quad {{.*}}xray_sleds_end1
diff --git a/llvm/test/CodeGen/X86/xray-custom-log.ll b/llvm/test/CodeGen/X86/xray-custom-log.ll
index c9eff581884..69fd0f3e9f7 100644
--- a/llvm/test/CodeGen/X86/xray-custom-log.ll
+++ b/llvm/test/CodeGen/X86/xray-custom-log.ll
@@ -7,17 +7,16 @@ define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
%val = load i32, i32* %eventsize
call void @llvm.xray.customevent(i8* %eventptr, i32 %val)
; CHECK-LABEL: Lxray_event_sled_0:
- ; CHECK: .byte 0xeb, 0x0f
- ; CHECK-NEXT: pushq %rdi
+ ; CHECK-NEXT: .ascii "\353\024
+ ; CHECK-NEXT: pushq %rax
; CHECK-NEXT: movq {{.*}}, %rdi
- ; CHECK-NEXT: pushq %rsi
; CHECK-NEXT: movq {{.*}}, %rsi
- ; CHECK-NEXT: callq __xray_CustomEvent
- ; CHECK-NEXT: popq %rsi
- ; CHECK-NEXT: popq %rdi
+ ; CHECK-NEXT: movabsq $__xray_CustomEvent, %rax
+ ; CHECK-NEXT: callq *%rax
+ ; CHECK-NEXT: popq %rax
ret i32 0
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .section {{.*}}xray_instr_map
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .quad {{.*}}xray_event_sled_0
diff --git a/llvm/test/CodeGen/X86/xray-log-args.ll b/llvm/test/CodeGen/X86/xray-log-args.ll
index 09d2b10f3d7..6fe450ac8ad 100644
--- a/llvm/test/CodeGen/X86/xray-log-args.ll
+++ b/llvm/test/CodeGen/X86/xray-log-args.ll
@@ -7,33 +7,29 @@ define i32 @callee(i32 %arg) nounwind noinline uwtable "function-instrument"="xr
ret i32 %arg
}
; CHECK-LABEL: Lxray_sleds_start0:
-; CHECK: .quad {{\.?}}Lxray_sled_0
-; CHECK: .quad {{_?}}callee
-; CHECK: .byte 0x03
-; CHECK: .byte 0x01
-; CHECK: .byte 0x00
-; CHECK: .{{(zero|space)}} 13
-; CHECK: .quad {{\.?}}Lxray_sled_1
-; CHECK: .quad {{_?}}callee
-; CHECK: .byte 0x01
-; CHECK: .byte 0x01
-; CHECK: .byte 0x00
-; CHECK: .{{(zero|space)}} 13
+; CHECK: .quad {{\.?}}Lxray_sled_0
+; CHECK: .quad {{_?}}callee
+; CHECK: .byte 3
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
+; CHECK: .quad {{\.?}}Lxray_sled_1
+; CHECK: .quad {{_?}}callee
+; CHECK: .byte 1
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
define i32 @caller(i32 %arg) nounwind noinline uwtable "function-instrument"="xray-always" "xray-log-args"="1" {
%retval = tail call i32 @callee(i32 %arg)
ret i32 %retval
}
; CHECK-LABEL: Lxray_sleds_start1:
-; CHECK: .quad {{\.?}}Lxray_sled_2
-; CHECK: .quad {{_?}}caller
-; CHECK: .byte 0x03
-; CHECK: .byte 0x01
-; CHECK: .byte 0x00
-; CHECK: .{{(zero|space)}} 13
-; CHECK: .quad {{\.?}}Lxray_sled_3
-; CHECK: .quad {{_?}}caller
-; CHECK: .byte 0x02
-; CHECK: .byte 0x01
-; CHECK: .byte 0x00
-; CHECK: .{{(zero|space)}} 13
+; CHECK: .quad {{\.?}}Lxray_sled_2
+; CHECK: .quad {{_?}}caller
+; CHECK: .byte 3
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
+; CHECK: .quad {{\.?}}Lxray_sled_3
+; CHECK: .quad {{_?}}caller
+; CHECK: .byte 2
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
diff --git a/llvm/test/CodeGen/X86/xray-loop-detection.ll b/llvm/test/CodeGen/X86/xray-loop-detection.ll
index 12904d76770..3cd6b4aa6f8 100644
--- a/llvm/test/CodeGen/X86/xray-loop-detection.ll
+++ b/llvm/test/CodeGen/X86/xray-loop-detection.ll
@@ -19,4 +19,5 @@ Exit:
; CHECK-LABEL: xray_sled_0:
; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp0:
diff --git a/llvm/test/CodeGen/X86/xray-section-group.ll b/llvm/test/CodeGen/X86/xray-section-group.ll
index a4c45a0893e..7dab8c2ebf7 100644
--- a/llvm/test/CodeGen/X86/xray-section-group.ll
+++ b/llvm/test/CodeGen/X86/xray-section-group.ll
@@ -5,14 +5,14 @@
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .section .text.foo,"ax",@progbits
ret i32 0
-; CHECK: .section xray_instr_map,"awo",@progbits,.text.foo,unique,1
+; CHECK: .section xray_instr_map,"a",@progbits
}
$bar = comdat any
define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-always" comdat($bar) {
; CHECK: .section .text.bar,"axG",@progbits,bar,comdat
ret i32 1
-; CHECK: .section xray_instr_map,"aGwo",@progbits,bar,comdat,.text.bar,unique,2
+; CHECK: .section xray_instr_map,"aG",@progbits,bar,comdat
}
; CHECK-OBJ: section xray_instr_map:
diff --git a/llvm/test/CodeGen/X86/xray-tail-call-sled.ll b/llvm/test/CodeGen/X86/xray-tail-call-sled.ll
index 59ab8ea5995..c4a973e529f 100644
--- a/llvm/test/CodeGen/X86/xray-tail-call-sled.ll
+++ b/llvm/test/CodeGen/X86/xray-tail-call-sled.ll
@@ -4,41 +4,49 @@
define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_0:
-; CHECK: .ascii "\353\t"
+; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp0:
ret i32 0
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_1:
-; CHECK: retq
+; CHECK-NEXT: retq
; CHECK-NEXT: nopw %cs:512(%rax,%rax)
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4, 0x90
+; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_0{{.*}}
+; CHECK-NEXT: .section {{.*}}xray_instr_map
; CHECK-LABEL: Lxray_sleds_start0:
; CHECK: .quad {{.*}}xray_sled_0
; CHECK: .quad {{.*}}xray_sled_1
; CHECK-LABEL: Lxray_sleds_end0:
-; CHECK-LABEL: xray_fn_idx
+; CHECK-NEXT: .section {{.*}}xray_fn_idx
+; CHECK-LABEL: Lxray_fn_idx_synth_0:
; CHECK: .quad {{.*}}xray_sleds_start0
; CHECK-NEXT: .quad {{.*}}xray_sleds_end0
define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_2:
-; CHECK: .ascii "\353\t"
+; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp1:
; CHECK: .p2align 1, 0x90
; CHECK-LABEL: Lxray_sled_3:
; CHECK-NEXT: .ascii "\353\t"
; CHECK-NEXT: nopw 512(%rax,%rax)
+; CHECK-LABEL: Ltmp2:
%retval = tail call i32 @callee()
; CHECK: jmp {{.*}}callee {{.*}}# TAILCALL
ret i32 %retval
}
-; CHECK-LABEL: xray_instr_map
+; CHECK: .p2align 4, 0x90
+; CHECK-NEXT: .quad {{.*}}xray_fn_idx_synth_1{{.*}}
; CHECK-LABEL: Lxray_sleds_start1:
; CHECK: .quad {{.*}}xray_sled_2
; CHECK: .quad {{.*}}xray_sled_3
; CHECK-LABEL: Lxray_sleds_end1:
-; CHECK-LABEL: xray_fn_idx
+; CHECK: .section {{.*}}xray_fn_idx
+; CHECK-LABEL: Lxray_fn_idx_synth_1:
; CHECK: .quad {{.*}}xray_sleds_start1
; CHECK: .quad {{.*}}xray_sleds_end1
OpenPOWER on IntegriCloud