From: Rafael Espindola Date: Mon, 28 Jul 2014 14:44:33 +0000 (+0000) Subject: Test the mcpu option. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ceda94799912d47f159a51dcaa7891e9ace7b2fb;p=oota-llvm.git Test the mcpu option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214087 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/gold/option.ll b/test/tools/gold/option.ll index af24d831f4b..49931801e62 100644 --- a/test/tools/gold/option.ll +++ b/test/tools/gold/option.ll @@ -2,6 +2,7 @@ ; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -m elf_x86_64 \ ; RUN: --plugin-opt=-jump-table-type=arity \ ; RUN: --plugin-opt=-mattr=+aes \ +; RUN: --plugin-opt=mcpu=core-avx2 \ ; RUN: -shared %t.o -o %t2.o ; RUN: llvm-nm %t2.o | FileCheck %s @@ -17,8 +18,14 @@ define i32 @f() unnamed_addr jumptable { ret i32 0 } -define <2 x i64> @test_avx(<2 x i64> %a0, <2 x i64> %a1) { +define <2 x i64> @test_aes(<2 x i64> %a0, <2 x i64> %a1) { %res = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %a0, <2 x i64> %a1) ret <2 x i64> %res } declare <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64>, <2 x i64>) nounwind readnone + +define <32 x i8> @test_avx2(<16 x i16> %a0, <16 x i16> %a1) { + %res = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a0, <16 x i16> %a1) + ret <32 x i8> %res +} +declare <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16>, <16 x i16>) nounwind readnone