summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-01-29 19:37:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-01-29 19:37:27 +0000
commite899a0b824d1fb8fdbd2dc0c38011a7e354a95fb (patch)
treeb015813b29931142742d4bafe3ab0aa1bec85598
parentc18cce405edb45bfc06b96a445225175e901a500 (diff)
downloadbcm5719-llvm-e899a0b824d1fb8fdbd2dc0c38011a7e354a95fb.tar.gz
bcm5719-llvm-e899a0b824d1fb8fdbd2dc0c38011a7e354a95fb.zip
Improve testcase.
We now test that pic and static produce different results for bar. The function names were demangled. The attributes are written inline. llvm-svn: 323680
-rw-r--r--llvm/test/CodeGen/X86/no-plt.ll34
1 files changed, 13 insertions, 21 deletions
diff --git a/llvm/test/CodeGen/X86/no-plt.ll b/llvm/test/CodeGen/X86/no-plt.ll
index d6383c2d7d1..9688a2e6f5b 100644
--- a/llvm/test/CodeGen/X86/no-plt.ll
+++ b/llvm/test/CodeGen/X86/no-plt.ll
@@ -1,30 +1,22 @@
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic \
-; RUN: | FileCheck -check-prefix=X64 %s
+; RUN: | FileCheck -check-prefix=X64 --check-prefix=PIC %s
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-gnu \
-; RUN: | FileCheck -check-prefix=X64 %s
+; RUN: | FileCheck -check-prefix=X64 --check-prefix=STATIC %s
-define i32 @main() #0 {
-; X64: callq *_Z3foov@GOTPCREL(%rip)
-; X64: callq _Z3barv
-; X64: callq _Z3bazv
+define i32 @main() {
+; X64: callq *foo@GOTPCREL(%rip)
+; PIC: callq bar@PLT
+; STATIC: callq bar{{$}}
+; X64: callq baz
-entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval, align 4
- %call1 = call i32 @_Z3foov()
- %call2 = call i32 @_Z3barv()
- %call3 = call i32 @_Z3bazv()
+ %call1 = call i32 @foo()
+ %call2 = call i32 @bar()
+ %call3 = call i32 @baz()
ret i32 0
}
-; Function Attrs: nonlazybind
-declare i32 @_Z3foov() #1
-
-declare i32 @_Z3barv() #2
-
-; Function Attrs: nonlazybind
-declare hidden i32 @_Z3bazv() #3
-
-
-attributes #1 = { nonlazybind }
-attributes #3 = { nonlazybind }
+declare i32 @foo() nonlazybind
+declare i32 @bar()
+declare hidden i32 @baz() nonlazybind
OpenPOWER on IntegriCloud