brintos

brintos / llvm-project-archived public Read only

0
0
Text · 855 B · 428aa32 Raw
29 lines · c
1// REQUIRES: aarch64-registered-target2// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2p1 \3// RUN:   -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK4// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2p1 \5// RUN:   -S -o /dev/null6 7void test_sve_asm(void) {8  asm volatile(9      "ptrue p0.d\n"10      "ptrue p15.d\n"11      "add z0.d, p0/m, z0.d, z0.d\n"12      "add z31.d, p0/m, z31.d, z31.d\n"13      :14      :15      : "z0", "z31", "p0", "p15");16  // CHECK-LABEL: @test_sve_asm17  // CHECK: "~{z0},~{z31},~{p0},~{p15}"18}19 20void test_sve2p1_asm(void) {21  asm("pfalse pn0.b\n"22      "ptrue pn8.d\n"23      "ptrue pn15.b\n"24      "pext p3.b, pn8[1]\n"25      ::: "pn0", "pn8", "pn15", "p3");26  // CHECK-LABEL: @test_sve2p1_asm27  // CHECK: "~{pn0},~{pn8},~{pn15},~{p3}"28}29