[llvm] 0b665c8 - [X86] Fix cmov-unpredictable MIR tests under expensive checks (#225011)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 01:23:09 PDT 2026
Author: Yangyu Chen
Date: 2026-09-21T08:23:02Z
New Revision: 0b665c8649f49dc8e44bec3540694b1662c16ea9
URL: https://github.com/llvm/llvm-project/commit/0b665c8649f49dc8e44bec3540694b1662c16ea9
DIFF: https://github.com/llvm/llvm-project/commit/0b665c8649f49dc8e44bec3540694b1662c16ea9.diff
LOG: [X86] Fix cmov-unpredictable MIR tests under expensive checks (#225011)
The machine functions have no body, so the MIR parser sets NoVRegs and
leaves TracksLiveness unset, and the verifier rejects the vregs created
by instruction selection. Declare tracksRegLiveness: true and noVRegs:
false, and add -verify-machineinstrs to the RUN lines.
Fixes https://lab.llvm.org/buildbot/#/builders/187/builds/23887 after
#223469 (commit a3d0da5c2c3cbfc1fc2d569700fd1a6b30c751dc).
Assisted-by: Claude Code:claude-fable-5-1
Added:
Modified:
llvm/test/CodeGen/X86/cmov-unpredictable-flag.mir
llvm/test/CodeGen/X86/cmov-unpredictable-mem.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/cmov-unpredictable-flag.mir b/llvm/test/CodeGen/X86/cmov-unpredictable-flag.mir
index 54e91ebe67239..43ebdd28b92b5 100644
--- a/llvm/test/CodeGen/X86/cmov-unpredictable-flag.mir
+++ b/llvm/test/CodeGen/X86/cmov-unpredictable-flag.mir
@@ -1,5 +1,5 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
-# RUN: llc -mtriple=x86_64 -start-before=x86-isel -stop-after=finalize-isel %s -o - | FileCheck %s
+# RUN: llc -mtriple=x86_64 -start-before=x86-isel -stop-after=finalize-isel -verify-machineinstrs %s -o - | FileCheck %s
# The unpredictable flag of a select through the CMOV rewrites in combineCMov.
# The machine functions have no body: instruction selection runs on the
@@ -45,6 +45,8 @@
...
---
name: simplified_eflags
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: simplified_eflags
; CHECK: bb.0 (%ir-block.0):
@@ -60,6 +62,8 @@ body: |
...
---
name: double_cmov
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: double_cmov
; CHECK: bb.0 (%ir-block.0):
@@ -77,6 +81,8 @@ body: |
...
---
name: constant_to_register
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: constant_to_register
; CHECK: bb.0 (%ir-block.0):
@@ -91,6 +97,8 @@ body: |
...
---
name: cttz_add
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: cttz_add
; CHECK: bb.0 (%ir-block.0):
diff --git a/llvm/test/CodeGen/X86/cmov-unpredictable-mem.mir b/llvm/test/CodeGen/X86/cmov-unpredictable-mem.mir
index b798a129101ba..7d1637af4c7bc 100644
--- a/llvm/test/CodeGen/X86/cmov-unpredictable-mem.mir
+++ b/llvm/test/CodeGen/X86/cmov-unpredictable-mem.mir
@@ -1,5 +1,5 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
-# RUN: llc -mtriple=x86_64 -start-before=x86-isel -stop-after=x86-cmov-conversion %s -o - | FileCheck %s
+# RUN: llc -mtriple=x86_64 -start-before=x86-isel -stop-after=x86-cmov-conversion -verify-machineinstrs %s -o - | FileCheck %s
# A select marked !unpredictable should stay a CMOV even when the CMOV folds a
# load: X86CmovConversion leaves CMOVs carrying the unpredictable flag alone.
@@ -26,6 +26,8 @@
...
---
name: load_or_zero
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: load_or_zero
; CHECK: bb.0 (%ir-block.0):
@@ -40,6 +42,8 @@ body: |
...
---
name: load_or_zero_nohint
+tracksRegLiveness: true
+noVRegs: false
body: |
; CHECK-LABEL: name: load_or_zero_nohint
; CHECK: bb.0 (%ir-block.0):
More information about the llvm-commits
mailing list