From bd3bde8900a05d2418f680bb19fced189a564efd Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 7 Mar 2025 10:34:39 +0000 Subject: [PATCH] [X86] mfence.ll - add COMMON prefix + replace X32 with X86 prefix We try to only use X32 for gnux32 triple Noticed while reviewing #106555 --- llvm/test/CodeGen/X86/mfence.ll | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/llvm/test/CodeGen/X86/mfence.ll b/llvm/test/CodeGen/X86/mfence.ll index f34657b3f240..8c29af864871 100644 --- a/llvm/test/CodeGen/X86/mfence.ll +++ b/llvm/test/CodeGen/X86/mfence.ll @@ -1,30 +1,25 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32 -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=-sse2 | FileCheck %s --check-prefix=X64 +; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,X86 +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=-sse2 | FileCheck %s --check-prefixes=CHECK,X64 ; It doesn't matter if an x86-64 target has specified "no-sse2"; we still can use mfence. define void @test() { -; X32-LABEL: test: -; X32: # %bb.0: -; X32-NEXT: mfence -; X32-NEXT: retl -; -; X64-LABEL: test: -; X64: # %bb.0: -; X64-NEXT: mfence -; X64-NEXT: retq +; CHECK-LABEL: test: +; CHECK: # %bb.0: +; CHECK-NEXT: mfence +; CHECK-NEXT: ret{{[l|q]}} fence seq_cst ret void } define i32 @fence(ptr %ptr) { -; X32-LABEL: fence: -; X32: # %bb.0: -; X32-NEXT: movl {{[0-9]+}}(%esp), %eax -; X32-NEXT: mfence -; X32-NEXT: movl (%eax), %eax -; X32-NEXT: retl +; X86-LABEL: fence: +; X86: # %bb.0: +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: mfence +; X86-NEXT: movl (%eax), %eax +; X86-NEXT: retl ; ; X64-LABEL: fence: ; X64: # %bb.0: