1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
6 ; This test case aims to test vector sign extend builtins.
8 declare <4 x i32> @llvm.ppc.altivec.vextsb2w(<16 x i8>) nounwind readnone
9 declare <2 x i64> @llvm.ppc.altivec.vextsb2d(<16 x i8>) nounwind readnone
10 declare <4 x i32> @llvm.ppc.altivec.vextsh2w(<8 x i16>) nounwind readnone
11 declare <2 x i64> @llvm.ppc.altivec.vextsh2d(<8 x i16>) nounwind readnone
12 declare <2 x i64> @llvm.ppc.altivec.vextsw2d(<4 x i32>) nounwind readnone
14 define <4 x i32> @test_vextsb2w(<16 x i8> %x) nounwind readnone {
15 ; CHECK-LABEL: test_vextsb2w:
17 ; CHECK-NEXT: vextsb2w v2, v2
19 %tmp = tail call <4 x i32> @llvm.ppc.altivec.vextsb2w(<16 x i8> %x)
23 define <2 x i64> @test_vextsb2d(<16 x i8> %x) nounwind readnone {
24 ; CHECK-LABEL: test_vextsb2d:
26 ; CHECK-NEXT: vextsb2d v2, v2
28 %tmp = tail call <2 x i64> @llvm.ppc.altivec.vextsb2d(<16 x i8> %x)
32 define <4 x i32> @test_vextsh2w(<8 x i16> %x) nounwind readnone {
33 ; CHECK-LABEL: test_vextsh2w:
35 ; CHECK-NEXT: vextsh2w v2, v2
37 %tmp = tail call <4 x i32> @llvm.ppc.altivec.vextsh2w(<8 x i16> %x)
41 define <2 x i64> @test_vextsh2d(<8 x i16> %x) nounwind readnone {
42 ; CHECK-LABEL: test_vextsh2d:
44 ; CHECK-NEXT: vextsh2d v2, v2
46 %tmp = tail call <2 x i64> @llvm.ppc.altivec.vextsh2d(<8 x i16> %x)
50 define <2 x i64> @test_vextsw2d(<4 x i32> %x) nounwind readnone {
51 ; CHECK-LABEL: test_vextsw2d:
53 ; CHECK-NEXT: vextsw2d v2, v2
55 %tmp = tail call <2 x i64> @llvm.ppc.altivec.vextsw2d(<4 x i32> %x)