[llvm] [X86] x86-shrink-wrapping.ll - ensure we don't hide stack math in the CHECKS (PR #197446)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 06:33:27 PDT 2026


https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/197446

Better checking of matching stack addresses

>From f64fbc503434126b36184be3edec4241039878f9 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Wed, 13 May 2026 14:32:29 +0100
Subject: [PATCH] [X86] x86-shrink-wrapping.ll - ensure we don't hide stack
 math in the CHECKS

Better checking of matching stack addresses
---
 llvm/test/CodeGen/X86/x86-shrink-wrapping.ll | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/llvm/test/CodeGen/X86/x86-shrink-wrapping.ll b/llvm/test/CodeGen/X86/x86-shrink-wrapping.ll
index 37620ecf8c1b8..23efdba9bcdeb 100644
--- a/llvm/test/CodeGen/X86/x86-shrink-wrapping.ll
+++ b/llvm/test/CodeGen/X86/x86-shrink-wrapping.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 -o - -enable-shrink-wrap=true -pass-remarks-output=%t -disable-cgp-delete-phis | FileCheck %s --check-prefix=ENABLE
 ; RUN: cat %t | FileCheck %s --check-prefix=REMARKS
 ; RUN: llc %s -o - -enable-shrink-wrap=false -disable-cgp-delete-phis | FileCheck %s --check-prefix=DISABLE
@@ -23,8 +23,8 @@ define i32 @foo(i32 %a, i32 %b) {
 ; ENABLE-NEXT:  ## %bb.1: ## %true
 ; ENABLE-NEXT:    pushq %rax
 ; ENABLE-NEXT:    .cfi_def_cfa_offset 16
-; ENABLE-NEXT:    movl %eax, {{[0-9]+}}(%rsp)
-; ENABLE-NEXT:    leaq {{[0-9]+}}(%rsp), %rsi
+; ENABLE-NEXT:    movl %eax, 4(%rsp)
+; ENABLE-NEXT:    leaq 4(%rsp), %rsi
 ; ENABLE-NEXT:    xorl %edi, %edi
 ; ENABLE-NEXT:    callq _doSomething
 ; ENABLE-NEXT:    addq $8, %rsp
@@ -39,8 +39,8 @@ define i32 @foo(i32 %a, i32 %b) {
 ; DISABLE-NEXT:    cmpl %esi, %edi
 ; DISABLE-NEXT:    jge LBB0_2
 ; DISABLE-NEXT:  ## %bb.1: ## %true
-; DISABLE-NEXT:    movl %eax, {{[0-9]+}}(%rsp)
-; DISABLE-NEXT:    leaq {{[0-9]+}}(%rsp), %rsi
+; DISABLE-NEXT:    movl %eax, 4(%rsp)
+; DISABLE-NEXT:    leaq 4(%rsp), %rsi
 ; DISABLE-NEXT:    xorl %edi, %edi
 ; DISABLE-NEXT:    callq _doSomething
 ; DISABLE-NEXT:  LBB0_2: ## %false



More information about the llvm-commits mailing list