From cbd3902fa397dce7b3958b48470ef0c04ac4d45b Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 4 May 2022 12:21:07 +0100 Subject: [PATCH] [X86] load-local illegal types tests - expose the load/store stack offsets Make it easier to track whats going on accessing parts of the custom sized types --- llvm/test/CodeGen/X86/load-local-v3i129.ll | 28 ++++++++++++++-------------- llvm/test/CodeGen/X86/load-local-v4i5.ll | 16 ++++++++-------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/llvm/test/CodeGen/X86/load-local-v3i129.ll b/llvm/test/CodeGen/X86/load-local-v3i129.ll index f339891..ad7aea3 100644 --- a/llvm/test/CodeGen/X86/load-local-v3i129.ll +++ b/llvm/test/CodeGen/X86/load-local-v3i129.ll @@ -1,38 +1,38 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=FAST-SHLD ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+slow-shld | FileCheck %s --check-prefix=SLOW-SHLD -define void @_start() { +define void @_start() nounwind { ; FAST-SHLD-LABEL: _start: ; FAST-SHLD: # %bb.0: # %Entry -; FAST-SHLD-NEXT: movq -{{[0-9]+}}(%rsp), %rax -; FAST-SHLD-NEXT: movq -{{[0-9]+}}(%rsp), %rcx +; FAST-SHLD-NEXT: movq -40(%rsp), %rax +; FAST-SHLD-NEXT: movq -32(%rsp), %rcx ; FAST-SHLD-NEXT: shrdq $2, %rcx, %rax ; FAST-SHLD-NEXT: shrq $2, %rcx ; FAST-SHLD-NEXT: leaq 1(,%rax,4), %rdx -; FAST-SHLD-NEXT: movq %rdx, -{{[0-9]+}}(%rsp) +; FAST-SHLD-NEXT: movq %rdx, -40(%rsp) ; FAST-SHLD-NEXT: shrdq $62, %rcx, %rax -; FAST-SHLD-NEXT: movq %rax, -{{[0-9]+}}(%rsp) -; FAST-SHLD-NEXT: orq $-2, -{{[0-9]+}}(%rsp) -; FAST-SHLD-NEXT: movq $-1, -{{[0-9]+}}(%rsp) +; FAST-SHLD-NEXT: movq %rax, -32(%rsp) +; FAST-SHLD-NEXT: orq $-2, -56(%rsp) +; FAST-SHLD-NEXT: movq $-1, -48(%rsp) ; FAST-SHLD-NEXT: retq ; ; SLOW-SHLD-LABEL: _start: ; SLOW-SHLD: # %bb.0: # %Entry -; SLOW-SHLD-NEXT: movq -{{[0-9]+}}(%rsp), %rax -; SLOW-SHLD-NEXT: movq -{{[0-9]+}}(%rsp), %rcx +; SLOW-SHLD-NEXT: movq -40(%rsp), %rax +; SLOW-SHLD-NEXT: movq -32(%rsp), %rcx ; SLOW-SHLD-NEXT: shrq $2, %rax ; SLOW-SHLD-NEXT: movq %rcx, %rdx ; SLOW-SHLD-NEXT: shlq $62, %rdx ; SLOW-SHLD-NEXT: orq %rax, %rdx ; SLOW-SHLD-NEXT: andq $-4, %rcx ; SLOW-SHLD-NEXT: leaq 1(,%rdx,4), %rax -; SLOW-SHLD-NEXT: movq %rax, -{{[0-9]+}}(%rsp) +; SLOW-SHLD-NEXT: movq %rax, -40(%rsp) ; SLOW-SHLD-NEXT: shrq $62, %rdx ; SLOW-SHLD-NEXT: orq %rcx, %rdx -; SLOW-SHLD-NEXT: movq %rdx, -{{[0-9]+}}(%rsp) -; SLOW-SHLD-NEXT: orq $-2, -{{[0-9]+}}(%rsp) -; SLOW-SHLD-NEXT: movq $-1, -{{[0-9]+}}(%rsp) +; SLOW-SHLD-NEXT: movq %rdx, -32(%rsp) +; SLOW-SHLD-NEXT: orq $-2, -56(%rsp) +; SLOW-SHLD-NEXT: movq $-1, -48(%rsp) ; SLOW-SHLD-NEXT: retq Entry: %y = alloca <3 x i129>, align 4 diff --git a/llvm/test/CodeGen/X86/load-local-v4i5.ll b/llvm/test/CodeGen/X86/load-local-v4i5.ll index 4ee0866..0b821b7 100644 --- a/llvm/test/CodeGen/X86/load-local-v4i5.ll +++ b/llvm/test/CodeGen/X86/load-local-v4i5.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s @0 = internal unnamed_addr constant [4 x i5] [i5 2, i5 0, i5 2, i5 -1], align 1 @@ -7,10 +7,10 @@ define void @_start() { ; CHECK-LABEL: _start: ; CHECK: # %bb.0: # %Entry ; CHECK-NEXT: movl __unnamed_1(%rip), %eax -; CHECK-NEXT: movl %eax, -{{[0-9]+}}(%rsp) -; CHECK-NEXT: movb -{{[0-9]+}}(%rsp), %cl -; CHECK-NEXT: movzbl -{{[0-9]+}}(%rsp), %edx -; CHECK-NEXT: movzbl -{{[0-9]+}}(%rsp), %esi +; CHECK-NEXT: movl %eax, -12(%rsp) +; CHECK-NEXT: movb -9(%rsp), %cl +; CHECK-NEXT: movzbl -10(%rsp), %edx +; CHECK-NEXT: movzbl -11(%rsp), %esi ; CHECK-NEXT: andl $31, %eax ; CHECK-NEXT: andl $31, %esi ; CHECK-NEXT: shll $5, %esi @@ -22,11 +22,11 @@ define void @_start() { ; CHECK-NEXT: movl %eax, %ecx ; CHECK-NEXT: shll $15, %ecx ; CHECK-NEXT: orl %edx, %ecx -; CHECK-NEXT: movw %cx, -{{[0-9]+}}(%rsp) +; CHECK-NEXT: movw %cx, -4(%rsp) ; CHECK-NEXT: shrl $16, %ecx ; CHECK-NEXT: andl $15, %ecx -; CHECK-NEXT: movb %cl, -{{[0-9]+}}(%rsp) -; CHECK-NEXT: movb %al, -{{[0-9]+}}(%rsp) +; CHECK-NEXT: movb %cl, -2(%rsp) +; CHECK-NEXT: movb %al, -5(%rsp) ; CHECK-NEXT: cmpb $31, %al ; CHECK-NEXT: je .LBB0_2 ; CHECK-NEXT: # %bb.1: # %Then -- 2.7.4