aboutsummaryrefslogtreecommitdiffstats
path: root/test/LTO
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
committerStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
commitdce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch)
treedcebc53f2b182f145a2e659393bf9a0472cedf23 /test/LTO
parent220b921aed042f9e520c26cffd8282a94c66c3d5 (diff)
downloadexternal_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/LTO')
-rw-r--r--test/LTO/attrs.ll15
-rw-r--r--test/LTO/keep-used-puts-during-instcombine.ll4
2 files changed, 17 insertions, 2 deletions
diff --git a/test/LTO/attrs.ll b/test/LTO/attrs.ll
new file mode 100644
index 0000000..d196747
--- /dev/null
+++ b/test/LTO/attrs.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s >%t1
+; RUN: llvm-lto -exported-symbol=test_x86_aesni_aeskeygenassist -mattr=+aes -o %t2 %t1
+; RUN: llvm-objdump -d %t2 | FileCheck -check-prefix=WITH_AES %s
+; RUN: not llvm-lto -exported-symbol=test_x86_aesni_aeskeygenassist -mattr=-aes -o %t3 %t1 2>&1 | FileCheck -check-prefix=WITHOUT_AES %s
+
+target triple = "x86_64-unknown-linux-gnu"
+declare <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64>, i8)
+define <2 x i64> @test_x86_aesni_aeskeygenassist(<2 x i64> %a0) {
+ ; WITH_AES: test_x86_aesni_aeskeygenassist
+ ; WITH_AES: aeskeygenassist
+ %res = call <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64> %a0, i8 7)
+ ret <2 x i64> %res
+}
+
+; WITHOUT_AES: LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aeskeygenassist
diff --git a/test/LTO/keep-used-puts-during-instcombine.ll b/test/LTO/keep-used-puts-during-instcombine.ll
index 1dc63dd..69ce3ee 100644
--- a/test/LTO/keep-used-puts-during-instcombine.ll
+++ b/test/LTO/keep-used-puts-during-instcombine.ll
@@ -20,14 +20,14 @@ entry:
ret i32 0
}
-define internal hidden i32 @printf(i8* readonly nocapture %fmt, ...) {
+define internal i32 @printf(i8* readonly nocapture %fmt, ...) {
entry:
%ret = call i32 @bar(i8* %fmt)
ret i32 %ret
}
; CHECK: define {{.*}} @puts(
-define internal hidden i32 @puts(i8* %s) {
+define internal i32 @puts(i8* %s) {
entry:
%ret = call i32 @bar(i8* %s)
ret i32 %ret