[clang] [NFC] Precommit test for issue #149512 (PR #153541)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 02:00:57 PDT 2025


https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/153541

>From 0a2cb6eb1140bdcdba9f3b8d526b4b005ad62637 Mon Sep 17 00:00:00 2001
From: Ami-zhang <zhanglimin at loongson.cn>
Date: Thu, 14 Aug 2025 11:08:26 +0800
Subject: [PATCH] [NFC] Precommit test for issue #149512

---
 clang/test/CodeGen/LoongArch/targetattr-lasx.c | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 clang/test/CodeGen/LoongArch/targetattr-lasx.c

diff --git a/clang/test/CodeGen/LoongArch/targetattr-lasx.c b/clang/test/CodeGen/LoongArch/targetattr-lasx.c
new file mode 100644
index 0000000000000..f4857406180a2
--- /dev/null
+++ b/clang/test/CodeGen/LoongArch/targetattr-lasx.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple loongarch64 -target-feature -lsx -emit-llvm %s -o - | FileCheck %s
+
+__attribute__((target("lasx")))
+// CHECK: #[[ATTR0:[0-9]+]] {
+void testlasx() {}
+
+// CHECK: attributes #[[ATTR0]] = { {{.*}}"target-features"="+64bit,+lasx,-lsx"{{.*}} }



More information about the cfe-commits mailing list