Skip to content

[RISCV][test] Improve test robustness. [NFCI] #141268

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

Conversation

fpetrogalli
Copy link
Member

In a0b6cfd the literal in the test needed to be updated because of the changes in the enums generated by tablegen.

We can achieve the same "reguse" constraint with a PseudoRET instruction.

In a0b6cfd the literal in the test
needed to be updated because of the changes in the enums generated by
tablegen.

We can achieve the same "reguse" constraint with a PseudoRET
instruction.
@fpetrogalli fpetrogalli requested a review from topperc May 23, 2025 18:00
@fpetrogalli
Copy link
Member Author

This should address the comment in https://github.com/llvm/llvm-project/pull/133031/files#r2049434561

@llvmbot
Copy link
Member

llvmbot commented May 23, 2025

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

Author: Francesco Petrogalli (fpetrogalli)

Changes

In a0b6cfd the literal in the test needed to be updated because of the changes in the enums generated by tablegen.

We can achieve the same "reguse" constraint with a PseudoRET instruction.


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

1 Files Affected:

  • (modified) llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-zve64f.mir (+2-5)
diff --git a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-zve64f.mir b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-zve64f.mir
index f151569ef4e57..ba79acce3cc1f 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-zve64f.mir
+++ b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-zve64f.mir
@@ -24,8 +24,7 @@ body:             |
     ; CHECK-NEXT: renamable $v8 = PseudoVLE64_V_M1 undef renamable $v8, [[COPY1]], 1, 6 /* e64 */, 2 /* tu, ma */, implicit $vl, implicit $vtype :: (load unknown-size, align 8)
     ; CHECK-NEXT: dead $x0 = PseudoVSETIVLI 8, 208 /* e32, m1, ta, ma */, implicit-def $vl, implicit-def $vtype
     ; CHECK-NEXT: renamable $v9 = PseudoVLE32_V_M1 undef renamable $v9, [[COPY]], 8, 5 /* e32 */, 2 /* tu, ma */, implicit $vl, implicit $vtype :: (load unknown-size, align 4)
-    ; CHECK-NEXT: INLINEASM &"# use $0 $1 $2 $3", 1 /* sideeffect attdialect */, 4194313 /* reguse:VR */, killed renamable $v10, 4194313 /* reguse:VR */, killed renamable $v11, 4194313 /* reguse:VR */, killed renamable $v8, 4194313 /* reguse:VR */, killed renamable $v9
-    ; CHECK-NEXT: PseudoRET
+    ; CHECK-NEXT: PseudoRET implicit $v8, implicit $v9, implicit $v10, implicit $v11
     %3:gpr = COPY $x12
     %2:gpr = COPY $x11
     %1:gpr = COPY $x10
@@ -34,7 +33,5 @@ body:             |
     renamable $v11 = PseudoVMV_S_X undef renamable $v11, %1, 8, 5 /* e32 */
     renamable $v8 = PseudoVLE64_V_M1 undef renamable $v8, %2, 1, 6 /* e64 */, 2 /* tu, ma */ :: (load unknown-size, align 8)
     renamable $v9 = PseudoVLE32_V_M1 undef renamable $v9, %3, 8, 5 /* e32 */, 2 /* tu, ma */ :: (load unknown-size, align 4)
-    INLINEASM &"# use $0 $1 $2 $3", 1 /* sideeffect attdialect */, 4194313 /* reguse:VR */, killed renamable $v10, 4194313 /* reguse:VR */, killed renamable $v11, 4194313 /* reguse:VR */, killed renamable $v8, 4194313 /* reguse:VR */, killed renamable $v9
-    PseudoRET
-
+    PseudoRET implicit $v8, implicit $v9, implicit $v10, implicit $v11
 ...

@fpetrogalli
Copy link
Member Author

@topperc - gentle ping in case you have missed this.

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. I remember looking at this last week and thought I approved it then.

@fpetrogalli fpetrogalli merged commit 777163c into llvm:main May 27, 2025
9 of 11 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
In a0b6cfd the literal in the test
needed to be updated because of the changes in the enums generated by
tablegen.

We can achieve the same "reguse" constraint with a PseudoRET
instruction.
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.

4 participants