[llvm] [X86] Add test for VPBLENDW Tuning (PR #179906)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 5 02:46:27 PST 2026


https://github.com/mahesh-attarde created https://github.com/llvm/llvm-project/pull/179906

In PR https://github.com/llvm/llvm-project/pull/178883 we fixed tuning for VPBLENDW with negative masked. Current test adds more cover for masks for both unsigned and signed case.

>From 376861c34494746f205a7c2f8b62019d36a4cbb9 Mon Sep 17 00:00:00 2001
From: mattarde <mattarde at intel.com>
Date: Thu, 5 Feb 2026 02:43:18 -0800
Subject: [PATCH] [X86] Add test for VBLENDW Tuning

---
 llvm/test/CodeGen/X86/x86-inst-tuning.mir | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 llvm/test/CodeGen/X86/x86-inst-tuning.mir

diff --git a/llvm/test/CodeGen/X86/x86-inst-tuning.mir b/llvm/test/CodeGen/X86/x86-inst-tuning.mir
new file mode 100644
index 0000000000000..2079faf714522
--- /dev/null
+++ b/llvm/test/CodeGen/X86/x86-inst-tuning.mir
@@ -0,0 +1,17 @@
+# RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f -run-pass=x86-fixup-inst-tuning %s -o - | FileCheck %s
+
+---
+name:            vblendw_test
+tracksRegLiveness: true
+body:             |
+  bb.0:
+    liveins: $xmm0, $xmm1
+    ; CHECK-LABEL: name: vblendw_test
+    ; CHECK:  renamable $xmm0 = VPBLENDDrri killed renamable $xmm0, renamable $xmm1, 5
+    ; CHECK:  renamable $xmm0 = VPBLENDDrri killed renamable $xmm0, renamable $xmm1, 10
+    ; CHECK:  renamable $xmm0 = VPBLENDWrri killed renamable $xmm0, killed renamable $xmm1, -86
+    ; CHECK:  RET64 implicit $xmm0
+    renamable $xmm0 = VPBLENDWrri killed renamable $xmm0,  renamable $xmm1, -205
+    renamable $xmm0 = VPBLENDWrri killed renamable $xmm0,  renamable $xmm1, 204
+    renamable $xmm0 = VPBLENDWrri killed renamable $xmm0, killed renamable $xmm1, -86
+    RET64 implicit $xmm0



More information about the llvm-commits mailing list