[llvm] r323680 - Improve testcase.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 11:37:28 PST 2018
Author: rafael
Date: Mon Jan 29 11:37:27 2018
New Revision: 323680
URL: http://llvm.org/viewvc/llvm-project?rev=323680&view=rev
Log:
Improve testcase.
We now test that pic and static produce different results for bar.
The function names were demangled.
The attributes are written inline.
Modified:
llvm/trunk/test/CodeGen/X86/no-plt.ll
Modified: llvm/trunk/test/CodeGen/X86/no-plt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/no-plt.ll?rev=323680&r1=323679&r2=323680&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/no-plt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/no-plt.ll Mon Jan 29 11:37:27 2018
@@ -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 at GOTPCREL(%rip)
-; X64: callq _Z3barv
-; X64: callq _Z3bazv
+define i32 @main() {
+; X64: callq *foo at GOTPCREL(%rip)
+; PIC: callq bar at 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
More information about the llvm-commits
mailing list