[llvm] [GlobalISel] Add G_STEP_VECTOR to computeKnownBits. (PR #190598)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 11:15:15 PDT 2026
================
@@ -0,0 +1,59 @@
+# NOTE: Assertions have been autogenerated by utils/update_givaluetracking_test_checks.py UTC_ARGS: --version 6
+# RUN: llc -mtriple=aarch64 -passes="print<gisel-value-tracking>" -filetype=null %s 2>&1 | FileCheck %s
+
+---
+name: StepVector_One
+body: |
+ bb.0:
+ ; CHECK-LABEL: name: @StepVector_One
+ ; CHECK-NEXT: %0:_ KnownBits:???????????????????????????????? SignBits:1
+ %0:_(<vscale x 4 x s32>) = G_STEP_VECTOR i32 1
+...
+---
+name: StepVector_Pow2
+body: |
+ bb.0:
+ ; CHECK-LABEL: name: @StepVector_Pow2
+ ; CHECK-NEXT: %0:_ KnownBits:????????????????????????????0000 SignBits:1
+ %0:_(<vscale x 4 x s32>) = G_STEP_VECTOR i32 16
+...
+---
+name: StepVector_NonPow2
+body: |
+ bb.0:
+ ; CHECK-LABEL: name: @StepVector_NonPow2
+ ; CHECK-NEXT: %0:_ KnownBits:???????????????????????????????? SignBits:1
+ %0:_(<vscale x 4 x s32>) = G_STEP_VECTOR i32 3
+...
+---
+name: StepVector_Narrow
+body: |
+ bb.0:
+ ; CHECK-LABEL: name: @StepVector_Narrow
+ ; CHECK-NEXT: %0:_ KnownBits:???????? SignBits:1
+ %0:_(<vscale x 8 x s8>) = G_STEP_VECTOR i8 1
+...
+---
+name: StepVector_Narrow_Pow2
+body: |
+ bb.0:
+ ; CHECK-LABEL: name: @StepVector_Narrow_Pow2
+ ; CHECK-NEXT: %0:_ KnownBits:??????00 SignBits:1
+ %0:_(<vscale x 8 x s8>) = G_STEP_VECTOR i8 4
+...
----------------
arsenm wrote:
This verifier check doesn't necessarily make sense, being negative or not is just a syntactical choice. Does it accept 4294967295?
https://github.com/llvm/llvm-project/pull/190598
More information about the llvm-commits
mailing list