Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions clang/test/CodeGen/LoongArch/targetattr-lasx.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid frequent test updates due to unrelated compiler changes in the future, I tend to only check function attributes: "target-features"="+64bit,+lasx,-lsx".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify the test.

Original file line number Diff line number Diff line change
@@ -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"{{.*}} }