af24d831f4b759477edc8d373425b0023ea64022
[oota-llvm.git] / test / tools / gold / option.ll
1 ; RUN: llvm-as %s -o %t.o
2 ; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -m elf_x86_64 \
3 ; RUN:    --plugin-opt=-jump-table-type=arity \
4 ; RUN:    --plugin-opt=-mattr=+aes \
5 ; RUN:    -shared %t.o -o %t2.o
6 ; RUN: llvm-nm %t2.o | FileCheck %s
7
8 ; CHECK: T __llvm_jump_instr_table_0_1
9 ; CHECK: T __llvm_jump_instr_table_1_1
10
11 target triple = "x86_64-unknown-linux-gnu"
12 define i32 @g(i32 %a) unnamed_addr jumptable {
13   ret i32 %a
14 }
15
16 define i32 @f() unnamed_addr jumptable {
17   ret i32 0
18 }
19
20 define <2 x i64> @test_avx(<2 x i64> %a0, <2 x i64> %a1) {
21   %res = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %a0, <2 x i64> %a1)
22   ret <2 x i64> %res
23 }
24 declare <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64>, <2 x i64>) nounwind readnone