summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/micromips-attr.c
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2017-05-22 12:47:43 +0000
committerSimon Atanasyan <simon@atanasyan.com>2017-05-22 12:47:43 +0000
commit2c87f5341dd0e0614d5b1e423e3dc1168cfedf44 (patch)
tree935bee54cec40e178dcaf8c58700ae436f4a72a3 /clang/test/CodeGen/micromips-attr.c
parente0b726f2fa4b9881e088c040791bb61b10b96632 (diff)
downloadbcm5719-llvm-2c87f5341dd0e0614d5b1e423e3dc1168cfedf44.tar.gz
bcm5719-llvm-2c87f5341dd0e0614d5b1e423e3dc1168cfedf44.zip
[mips] Support `micromips` attribute
This patch adds support for the `micromips` and `nomicromips` attributes for MIPS targets. Differential revision: https://reviews.llvm.org/D33363 llvm-svn: 303546
Diffstat (limited to 'clang/test/CodeGen/micromips-attr.c')
-rw-r--r--clang/test/CodeGen/micromips-attr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/micromips-attr.c b/clang/test/CodeGen/micromips-attr.c
new file mode 100644
index 00000000000..96ba774afc0
--- /dev/null
+++ b/clang/test/CodeGen/micromips-attr.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+void __attribute__((micromips)) foo (void) {}
+
+// CHECK: define void @foo() [[MICROMIPS:#[0-9]+]]
+
+void __attribute__((nomicromips)) nofoo (void) {}
+
+// CHECK: define void @nofoo() [[NOMICROMIPS:#[0-9]+]]
+
+// CHECK: attributes [[MICROMIPS]] = { noinline nounwind {{.*}} "micromips" {{.*}} }
+// CHECK: attributes [[NOMICROMIPS]] = { noinline nounwind {{.*}} "nomicromips" {{.*}} }
OpenPOWER on IntegriCloud