Skip to content

Commit a825dc6

Browse files
committed
[Clang][RISCV] Precommit to show current codegen for inline asm of RVV tuple type
The generated LLVM cannot be successfully handled because function argument of tuple type is an aggregate of scalable vectors. It needs to be flattened into separate arguments.
1 parent 6f232cc commit a825dc6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-inline-asm.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ void bar() {
2727
vint32m1x2_t v0, v2;
2828
asm ("#NOP" : "=vr" (v0), "=vr" (v2));
2929
}
30+
31+
// CHECK-LABEL: define dso_local void @baz(
32+
// CHECK-SAME: ) #[[ATTR0]] {
33+
// CHECK-NEXT: entry:
34+
// CHECK-NEXT: call void asm sideeffect "#NOP", "^vr"({ <vscale x 2 x i32>, <vscale x 2 x i32> } undef) #[[ATTR2:[0-9]+]], !srcloc !6
35+
// CHECK-NEXT: ret void
36+
//
37+
void baz() {
38+
vint32m1x2_t v2;
39+
asm ("#NOP" :: "vr" (v2));
40+
}

0 commit comments

Comments
 (0)