brintos

brintos / llvm-project-archived public Read only

0
0
Text · 749 B · e16bd1d Raw
22 lines · plain
1; RUN: llc --mtriple=loongarch32 --mattr=+f --verify-machineinstrs < %s | FileCheck %s2; RUN: llc --mtriple=loongarch64 --mattr=+f --verify-machineinstrs < %s | FileCheck %s3 4;; Check that the "q" operand is not R0.5define i32 @constraint_q_not_r0() {6; CHECK-NOT:    csrxchg ${{[a-z]*}}, $r0, 07; CHECK-NOT:    csrxchg ${{[a-z]*}}, $zero, 08entry:9  %2 = tail call i32 asm "csrxchg $0, $1, 0", "=r,q,0"(i32 0, i32 0)10  ret i32 %211}12 13;; Check that the "q" operand is not R1.14define i32 @constraint_q_not_r1(i32 %0) {15; CHECK-NOT:    csrxchg ${{[a-z]*}}, $r1, 016; CHECK-NOT:    csrxchg ${{[a-z]*}}, $ra, 017entry:18  %2 = tail call i32 asm "", "={$r1},{$r1}"(i32 0)19  %3 = tail call i32 asm "csrxchg $0, $1, 0", "=r,q,0"(i32 %2, i32 %0)20  ret i32 %321}22