xref: /llvm-project/llvm/test/CodeGen/RISCV/inline-asm-s-constraint-error.ll (revision 10a55caccf4e2d397f94c1455b93d774591be45f)
1; RUN: not llc -mtriple=riscv64 < %s 2>&1 | FileCheck %s
2
3@a = external global [4 x i32], align 16
4
5; CHECK-COUNT-2: error: invalid operand for inline asm constraint 's'
6; CHECK-NOT:     error:
7define void @test(i64 %i) {
8entry:
9  %x = alloca i32, align 4
10  %ai = getelementptr inbounds [4 x i32], ptr @a, i64 0, i64 %i
11  call void asm sideeffect "", "s,~{dirflag},~{fpsr},~{flags}"(ptr %x)
12  call void asm sideeffect "", "s,~{dirflag},~{fpsr},~{flags}"(ptr %ai)
13  ret void
14}
15