[llvm] a82ca1c - [X86] insertps-from-constantpool.ll - replace X32 check prefixes with X86 and expose address math

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 04:09:06 PST 2024


Author: Simon Pilgrim
Date: 2024-01-31T12:01:01Z
New Revision: a82ca1cd1b57671ce5ddbed63c6418f6841fe71d

URL: https://github.com/llvm/llvm-project/commit/a82ca1cd1b57671ce5ddbed63c6418f6841fe71d
DIFF: https://github.com/llvm/llvm-project/commit/a82ca1cd1b57671ce5ddbed63c6418f6841fe71d.diff

LOG: [X86] insertps-from-constantpool.ll - replace X32 check prefixes with X86 and expose address math

We try to only use X32 for gnux32 triple tests.

Use no_x86_scrub_mem_shuffle so the test shows updated shuffle intermediate and the +4 offset into the constant pool vector entry

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/insertps-from-constantpool.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/insertps-from-constantpool.ll b/llvm/test/CodeGen/X86/insertps-from-constantpool.ll
index e0a371ebe40a6..f03df634dc1de 100644
--- a/llvm/test/CodeGen/X86/insertps-from-constantpool.ll
+++ b/llvm/test/CodeGen/X86/insertps-from-constantpool.ll
@@ -1,17 +1,18 @@
-; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse4.1 < %s | FileCheck %s --check-prefix=X32
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_mem_shuffle --version 4
+; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse4.1 < %s | FileCheck %s --check-prefix=X86
 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 < %s | FileCheck %s --check-prefix=X64
 
 ; Test for case where insertps folds the load of an insertion element from a constant pool.
 
 define <4 x float> @fold_from_constantpool(<4 x float> %a) {
-; X32-LABEL: fold_from_constantpool:
-; X32:       # %bb.0:
-; X32-NEXT:    insertps {{.*#+}} xmm0 = mem[0],xmm0[1,2,3]
-; X32-NEXT:    retl
+; X86-LABEL: fold_from_constantpool:
+; X86:       # %bb.0:
+; X86-NEXT:    insertps $0, {{\.?LCPI[0-9]+_[0-9]+}}+4, %xmm0 # xmm0 = mem[0],xmm0[1,2,3]
+; X86-NEXT:    retl
 ;
 ; X64-LABEL: fold_from_constantpool:
 ; X64:       # %bb.0:
-; X64-NEXT:    insertps {{.*#+}} xmm0 = mem[0],xmm0[1,2,3]
+; X64-NEXT:    insertps $0, {{\.?LCPI[0-9]+_[0-9]+}}+4(%rip), %xmm0 # xmm0 = mem[0],xmm0[1,2,3]
 ; X64-NEXT:    retq
   %1 = call <4 x float> @llvm.x86.sse41.insertps(<4 x float> %a, <4 x float> <float 0.0, float 1.0, float 0.0, float 0.0>, i8 64)
   ret <4 x float> %1


        


More information about the llvm-commits mailing list