Skip to content

[RISCV][GISEL] regbankselect for G_VMCLR_VL #110746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

michaelmaitland
Copy link
Contributor

These are genereated when legalizing G_SPLAT_VECTOR

These are genereated when legalizing G_SPLAT_VECTOR
@llvmbot
Copy link
Member

llvmbot commented Oct 1, 2024

@llvm/pr-subscribers-llvm-globalisel

@llvm/pr-subscribers-backend-risc-v

Author: Michael Maitland (michaelmaitland)

Changes

These are genereated when legalizing G_SPLAT_VECTOR


Full diff: https://github.com/llvm/llvm-project/pull/110746.diff

1 Files Affected:

  • (added) llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/rvv/vmclr.mir (+149)
diff --git a/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/rvv/vmclr.mir b/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/rvv/vmclr.mir
new file mode 100644
index 00000000000000..f12818227119be
--- /dev/null
+++ b/llvm/test/CodeGen/RISCV/GlobalISel/regbankselect/rvv/vmclr.mir
@@ -0,0 +1,149 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
+# RUN: llc -mtriple=riscv32 -mattr=+m,+v -run-pass=regbankselect \
+# RUN:   -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
+# RUN:   -o - | FileCheck -check-prefix=RV32I %s
+# RUN: llc -mtriple=riscv64 -mattr=+m,+v -run-pass=regbankselect \
+# RUN:   -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
+# RUN:   -o - | FileCheck -check-prefix=RV64I %s
+
+---
+name:            splat_zero_nxv1i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv1i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 1 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv1i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 1 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 1 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 1 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv2i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv2i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 2 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv2i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 2 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 2 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 2 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv4i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv4i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 4 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv4i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 4 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 4 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 4 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv8i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv8i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 8 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv8i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 8 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 8 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 8 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv16i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv16i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 16 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv16i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 16 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 16 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 16 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv32i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv32i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 32 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv32i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 32 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 32 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 32 x s1>)
+    PseudoRET implicit $v0
+
+...
+---
+name:            splat_zero_nxv64i1
+legalized:       true
+regBankSelected: false
+body:             |
+  bb.1:
+    ; RV32I-LABEL: name: splat_zero_nxv64i1
+    ; RV32I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 64 x s1>) = G_VMCLR_VL $x0
+    ; RV32I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 64 x s1>)
+    ; RV32I-NEXT: PseudoRET implicit $v0
+    ;
+    ; RV64I-LABEL: name: splat_zero_nxv64i1
+    ; RV64I: [[VMCLR_VL:%[0-9]+]]:vrb(<vscale x 64 x s1>) = G_VMCLR_VL $x0
+    ; RV64I-NEXT: $v0 = COPY [[VMCLR_VL]](<vscale x 64 x s1>)
+    ; RV64I-NEXT: PseudoRET implicit $v0
+    %0:_(<vscale x 64 x s1>) = G_VMCLR_VL $x0
+    $v0 = COPY %0(<vscale x 64 x s1>)
+    PseudoRET implicit $v0
+
+...
+

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelmaitland michaelmaitland merged commit d7e0c08 into llvm:main Oct 2, 2024
11 checks passed
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Oct 3, 2024
These are genereated when legalizing G_SPLAT_VECTOR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants