brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 230929e Raw
73 lines · plain
1; Check the vecpopcnt* instructions that were added in P82; In addition, check the conversions to/from the v2i64 VMX register that was also added in P8.3; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s4; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s5 6declare <16 x i8> @llvm.ctpop.v16i8(<16 x i8>) nounwind readnone7declare <8 x i16> @llvm.ctpop.v8i16(<8 x i16>) nounwind readnone8declare <4 x i32> @llvm.ctpop.v4i32(<4 x i32>) nounwind readnone9declare <2 x i64> @llvm.ctpop.v2i64(<2 x i64>) nounwind readnone10 11define <16 x i8> @test_v16i8_v2i64(<2 x i64> %x) nounwind readnone {12       %tmp  = bitcast <2 x i64> %x to <16 x i8>;13       %vcnt = tail call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> %tmp)14       ret <16 x i8> %vcnt15; CHECK: @test_v16i8_v2i6416; CHECK: vpopcntb 2, 217; CHECK: blr18}19 20define <8 x i16> @test_v8i16_v2i64(<2 x i64> %x) nounwind readnone {21       %tmp = bitcast <2 x i64> %x to <8 x i16>22       %vcnt = tail call <8 x i16> @llvm.ctpop.v8i16(<8 x i16> %tmp)23       ret <8 x i16> %vcnt24; CHECK: @test_v8i16_v2i6425; CHECK: vpopcnth 2, 226; CHECK: blr27}28 29define <4 x i32> @test_v4i32_v2i64(<2 x i64> %x) nounwind readnone {30       %tmp = bitcast <2 x i64> %x to <4 x i32>31       %vcnt = tail call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> %tmp)32       ret <4 x i32> %vcnt33; CHECK: @test_v4i32_v2i6434; CHECK: vpopcntw 2, 235; CHECK: blr36}37 38define <2 x i64> @test_v2i64_v2i64(<2 x i64> %x) nounwind readnone {39       %vcnt = tail call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %x)40       ret <2 x i64> %vcnt41; CHECK: @test_v2i64_v2i6442; CHECK: vpopcntd 2, 243; CHECK: blr44}45 46define <2 x i64> @test_v2i64_v4i32(<4 x i32> %x) nounwind readnone {47       %tmp = bitcast <4 x i32> %x to <2 x i64>48       %vcnt = tail call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %tmp)49       ret <2 x i64> %vcnt50; CHECK: @test_v2i64_v4i3251; CHECK: vpopcntd 2, 252; CHECK: blr53}54 55 56define <2 x i64> @test_v2i64_v8i16(<8 x i16> %x) nounwind readnone {57       %tmp = bitcast <8 x i16> %x to <2 x i64>58       %vcnt = tail call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %tmp)59       ret <2 x i64> %vcnt60; CHECK: @test_v2i64_v8i1661; CHECK: vpopcntd 2, 262; CHECK: blr63}64 65define <2 x i64> @test_v2i64_v16i8(<16 x i8> %x) nounwind readnone {66       %tmp = bitcast <16 x i8> %x to <2 x i64>67       %vcnt = tail call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %tmp)68       ret <2 x i64> %vcnt69; CHECK: @test_v2i64_v16i870; CHECK: vpopcntd 2, 271; CHECK: blr72}73