brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 737272f Raw
38 lines · plain
1; RUN: opt < %s  -passes="print<cost-model>" 2>&1 -disable-output -mtriple=i386 -mcpu=corei7-avx | FileCheck %s -check-prefix=CHECK322; RUN: opt < %s  -passes="print<cost-model>" 2>&1 -disable-output -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s -check-prefix=CHECK643 4%i4 = type <4 x i32>5%i8 = type <2 x i64>6 7;;; TEST HANDLING OF VARIOUS VECTOR SIZES8 9declare %i4 @llvm.bswap.v4i32(%i4)10declare %i8 @llvm.bswap.v2i64(%i8)11 12declare %i4 @llvm.cttz.v4i32(%i4)13declare %i8 @llvm.cttz.v2i64(%i8)14 15; CHECK32-LABEL: test_scalarized_intrinsics16; CHECK64-LABEL: test_scalarized_intrinsics17define void @test_scalarized_intrinsics() {18        %r1 = add %i8 undef, undef19 20; CHECK32: cost of 2 {{.*}}bswap.v4i3221; CHECK64: cost of 2 {{.*}}bswap.v4i3222        %r2 = call %i4 @llvm.bswap.v4i32(%i4 undef)23; CHECK32: cost of 2 {{.*}}bswap.v2i6424; CHECK64: cost of 2 {{.*}}bswap.v2i6425        %r3 = call %i8 @llvm.bswap.v2i64(%i8 undef)26 27; CHECK32: cost of 11 {{.*}}cttz.v4i3228; CHECK64: cost of 11 {{.*}}cttz.v4i3229        %r4 = call %i4 @llvm.cttz.v4i32(%i4 undef)30; CHECK32: cost of 9 {{.*}}cttz.v2i6431; CHECK64: cost of 9 {{.*}}cttz.v2i6432        %r5 = call %i8 @llvm.cttz.v2i64(%i8 undef)33 34; CHECK32: ret35; CHECK64: ret36        ret void37}38