summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll
diff options
context:
space:
mode:
authorArtyom Skrobov <Artyom.Skrobov@arm.com>2015-12-07 14:22:39 +0000
committerArtyom Skrobov <Artyom.Skrobov@arm.com>2015-12-07 14:22:39 +0000
commite9b3fb86034fb4a444f4ad81532a0cde63ac9cb3 (patch)
tree80cf8317b846fb824271c23ceffb20a187360b79 /llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll
parent1493e37f3485d878cd5796b28a16067cc3e1a164 (diff)
downloadbcm5719-llvm-e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3.tar.gz
bcm5719-llvm-e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3.zip
[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
Summary: This reverts r254234, and adds a simple fix for the annoying case of use-after-free. Reviewers: rengolin Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D15236 llvm-svn: 254912
Diffstat (limited to 'llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll')
-rw-r--r--llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll
new file mode 100644
index 00000000000..cbdb915045c
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll
@@ -0,0 +1,18 @@
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 | FileCheck %s
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 | FileCheck %s
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 | FileCheck %s
+
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ
+; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ
+
+; CHECK: .eabi_attribute 30, 6 @ Tag_ABI_optimization_goals
+; CHECK-OBJ: TagName: ABI_optimization_goals
+; CHECK-OBJ-NEXT: Description: Best Debugging
+
+define i32 @f(i64 %z) #0 {
+ ret i32 0
+}
+
+attributes #0 = { noinline optnone }
+
OpenPOWER on IntegriCloud