1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[X86] Regenerate mixed-ptr tests checks

Help reduce the diffs in D81517
This commit is contained in:
Simon Pilgrim 2020-06-17 15:48:07 +01:00
parent 30d12a5b04
commit 96c16f069b
2 changed files with 75 additions and 46 deletions

View File

@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s | FileCheck --check-prefixes=CHECK %s
; RUN: llc -O0 < %s | FileCheck --check-prefixes=CHECK-O0 %s
; RUN: llc < %s | FileCheck %s --check-prefixes=ALL,CHECK
; RUN: llc -O0 < %s | FileCheck %s --check-prefixes=ALL,CHECK-O0
; Source to regenerate:
; struct Foo {
@ -77,21 +77,13 @@ entry:
}
define dso_local void @test_zero_ext(%struct.Foo* %f, i32 addrspace(271)* %i) {
; CHECK-LABEL: test_zero_ext:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: movl %eax, 8(%ecx)
; CHECK-NEXT: movl $0, 12(%ecx)
; CHECK-NEXT: jmp _use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_zero_ext:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-O0-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-O0-NEXT: movl %eax, 8(%ecx)
; CHECK-O0-NEXT: movl $0, 12(%ecx)
; CHECK-O0-NEXT: jmp _use_foo # TAILCALL
; ALL-LABEL: test_zero_ext:
; ALL: # %bb.0: # %entry
; ALL-NEXT: movl {{[0-9]+}}(%esp), %eax
; ALL-NEXT: movl {{[0-9]+}}(%esp), %ecx
; ALL-NEXT: movl %eax, 8(%ecx)
; ALL-NEXT: movl $0, 12(%ecx)
; ALL-NEXT: jmp _use_foo # TAILCALL
entry:
%0 = addrspacecast i32 addrspace(271)* %i to i32 addrspace(272)*
%p64 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i32 0, i32 1
@ -127,19 +119,12 @@ entry:
}
define dso_local void @test_noop1(%struct.Foo* %f, i32* %i) {
; CHECK-LABEL: test_noop1:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: movl %eax, (%ecx)
; CHECK-NEXT: jmp _use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_noop1:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-O0-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-O0-NEXT: movl %eax, (%ecx)
; CHECK-O0-NEXT: jmp _use_foo # TAILCALL
; ALL-LABEL: test_noop1:
; ALL: # %bb.0: # %entry
; ALL-NEXT: movl {{[0-9]+}}(%esp), %eax
; ALL-NEXT: movl {{[0-9]+}}(%esp), %ecx
; ALL-NEXT: movl %eax, (%ecx)
; ALL-NEXT: jmp _use_foo # TAILCALL
entry:
%p32 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i32 0, i32 0
store i32* %i, i32** %p32, align 8

View File

@ -1,5 +1,6 @@
; RUN: llc < %s | FileCheck --check-prefixes=CHECK %s
; RUN: llc -O0 < %s | FileCheck --check-prefixes=CHECK %s
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s | FileCheck %s --check-prefixes=ALL,CHECK
; RUN: llc -O0 < %s | FileCheck %s --check-prefixes=ALL,CHECK-O0
; Source to regenerate:
; struct Foo {
@ -45,8 +46,11 @@ target triple = "x86_64-unknown-windows-msvc"
declare dso_local void @use_foo(%struct.Foo*)
define dso_local void @test_sign_ext(%struct.Foo* %f, i32 addrspace(270)* %i) {
; CHECK-LABEL: test_sign_ext
; CHECK: movslq %edx, %rax
; ALL-LABEL: test_sign_ext:
; ALL: # %bb.0: # %entry
; ALL-NEXT: movslq %edx, %rax
; ALL-NEXT: movq %rax, 8(%rcx)
; ALL-NEXT: jmp use_foo # TAILCALL
entry:
%0 = addrspacecast i32 addrspace(270)* %i to i32*
%p64 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 1
@ -56,8 +60,18 @@ entry:
}
define dso_local void @test_zero_ext(%struct.Foo* %f, i32 addrspace(271)* %i) {
; CHECK-LABEL: test_zero_ext
; CHECK: movl %edx, %eax
; CHECK-LABEL: test_zero_ext:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edx, %eax
; CHECK-NEXT: movq %rax, 8(%rcx)
; CHECK-NEXT: jmp use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_zero_ext:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: movl %edx, %eax
; CHECK-O0-NEXT: # kill: def $rax killed $eax
; CHECK-O0-NEXT: movq %rax, 8(%rcx)
; CHECK-O0-NEXT: jmp use_foo # TAILCALL
entry:
%0 = addrspacecast i32 addrspace(271)* %i to i32*
%p64 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 1
@ -67,8 +81,16 @@ entry:
}
define dso_local void @test_trunc(%struct.Foo* %f, i32* %i) {
; CHECK-LABEL: test_trunc
; CHECK: movl %edx, (%rcx)
; CHECK-LABEL: test_trunc:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edx, (%rcx)
; CHECK-NEXT: jmp use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_trunc:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: # kill: def $edx killed $edx killed $rdx
; CHECK-O0-NEXT: movl %edx, (%rcx)
; CHECK-O0-NEXT: jmp use_foo # TAILCALL
entry:
%0 = addrspacecast i32* %i to i32 addrspace(270)*
%p32 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 0
@ -78,8 +100,10 @@ entry:
}
define dso_local void @test_noop1(%struct.Foo* %f, i32 addrspace(270)* %i) {
; CHECK-LABEL: test_noop1
; CHECK: movl %edx, (%rcx)
; ALL-LABEL: test_noop1:
; ALL: # %bb.0: # %entry
; ALL-NEXT: movl %edx, (%rcx)
; ALL-NEXT: jmp use_foo # TAILCALL
entry:
%p32 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 0
store i32 addrspace(270)* %i, i32 addrspace(270)** %p32, align 8
@ -88,8 +112,10 @@ entry:
}
define dso_local void @test_noop2(%struct.Foo* %f, i32* %i) {
; CHECK-LABEL: test_noop2
; CHECK: movq %rdx, 8(%rcx)
; ALL-LABEL: test_noop2:
; ALL: # %bb.0: # %entry
; ALL-NEXT: movq %rdx, 8(%rcx)
; ALL-NEXT: jmp use_foo # TAILCALL
entry:
%p64 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 1
store i32* %i, i32** %p64, align 8
@ -106,8 +132,16 @@ entry:
; Test casts between unrecognized address spaces.
define void @test_unrecognized(%struct.Foo* %f, i32 addrspace(14)* %i) {
; CHECK-LABEL: test_unrecognized
; CHECK: movl %edx, (%rcx)
; CHECK-LABEL: test_unrecognized:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edx, (%rcx)
; CHECK-NEXT: jmp use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_unrecognized:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: # kill: def $edx killed $edx killed $rdx
; CHECK-O0-NEXT: movl %edx, (%rcx)
; CHECK-O0-NEXT: jmp use_foo # TAILCALL
entry:
%0 = addrspacecast i32 addrspace(14)* %i to i32 addrspace(270)*
%p32 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 0
@ -117,8 +151,18 @@ entry:
}
define void @test_unrecognized2(%struct.Foo* %f, i32 addrspace(271)* %i) {
; CHECK-LABEL: test_unrecognized2
; CHECK: movl %edx, %eax
; CHECK-LABEL: test_unrecognized2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: movl %edx, %eax
; CHECK-NEXT: movq %rax, 16(%rcx)
; CHECK-NEXT: jmp use_foo # TAILCALL
;
; CHECK-O0-LABEL: test_unrecognized2:
; CHECK-O0: # %bb.0: # %entry
; CHECK-O0-NEXT: movl %edx, %eax
; CHECK-O0-NEXT: # kill: def $rax killed $eax
; CHECK-O0-NEXT: movq %rax, 16(%rcx)
; CHECK-O0-NEXT: jmp use_foo # TAILCALL
entry:
%0 = addrspacecast i32 addrspace(271)* %i to i32 addrspace(9)*
%p32 = getelementptr inbounds %struct.Foo, %struct.Foo* %f, i64 0, i32 2