1; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu \ 2; RUN: -verify-machineinstrs < %s | FileCheck %s 3 4; Function Attrs: nounwind readnone 5define zeroext i32 @testCTZ32(i32 signext %a) { 6entry: 7 %0 = tail call i32 @llvm.cttz.i32(i32 %a, i1 false) 8 ret i32 %0 9; CHECK-LABEL: testCTZ32 10; CHECK: cnttzw 3, 3 11} 12 13; Function Attrs: nounwind readnone 14declare i32 @llvm.cttz.i32(i32, i1) 15 16; Function Attrs: nounwind readnone 17define zeroext i32 @testCTZ64(i64 %a) { 18entry: 19 %0 = tail call i64 @llvm.cttz.i64(i64 %a, i1 false) 20 %cast = trunc i64 %0 to i32 21 ret i32 %cast 22; CHECK-LABEL: testCTZ64 23; CHECK: cnttzd 3, 3 24} 25 26; Function Attrs: nounwind readnone 27declare i64 @llvm.cttz.i64(i64, i1) 28 29; Function Attrs: nounwind readnone 30define <16 x i8> @testVCMPNEB(<16 x i8> %a, <16 x i8> %b) { 31entry: 32 %0 = tail call <16 x i8> @llvm.ppc.altivec.vcmpneb(<16 x i8> %a, <16 x i8> %b) 33 ret <16 x i8> %0 34; CHECK-LABEL: testVCMPNEB 35; CHECK: vcmpneb 2, 2 36} 37 38; Function Attrs: nounwind readnone 39declare <16 x i8> @llvm.ppc.altivec.vcmpneb(<16 x i8>, <16 x i8>) 40 41; Function Attrs: nounwind readnone 42define <16 x i8> @testVCMPNEZB(<16 x i8> %a, <16 x i8> %b) { 43entry: 44 %0 = tail call <16 x i8> @llvm.ppc.altivec.vcmpnezb(<16 x i8> %a, <16 x i8> %b) 45 ret <16 x i8> %0 46; CHECK-LABEL: testVCMPNEZB 47; CHECK: vcmpnezb 2, 2 48} 49 50; Function Attrs: nounwind readnone 51declare <16 x i8> @llvm.ppc.altivec.vcmpnezb(<16 x i8>, <16 x i8>) 52 53; Function Attrs: nounwind readnone 54define <8 x i16> @testVCMPNEH(<8 x i16> %a, <8 x i16> %b) { 55entry: 56 %0 = tail call <8 x i16> @llvm.ppc.altivec.vcmpneh(<8 x i16> %a, <8 x i16> %b) 57 ret <8 x i16> %0 58; CHECK-LABEL: testVCMPNEH 59; CHECK: vcmpneh 2, 2 60} 61 62; Function Attrs: nounwind readnone 63declare <8 x i16> @llvm.ppc.altivec.vcmpneh(<8 x i16>, <8 x i16>) 64 65; Function Attrs: nounwind readnone 66define <8 x i16> @testVCMPNEZH(<8 x i16> %a, <8 x i16> %b) { 67entry: 68 %0 = tail call <8 x i16> @llvm.ppc.altivec.vcmpnezh(<8 x i16> %a, <8 x i16> %b) 69 ret <8 x i16> %0 70; CHECK-LABEL: testVCMPNEZH 71; CHECK: vcmpnezh 2, 2 72} 73 74; Function Attrs: nounwind readnone 75declare <8 x i16> @llvm.ppc.altivec.vcmpnezh(<8 x i16>, <8 x i16>) 76 77; Function Attrs: nounwind readnone 78define <4 x i32> @testVCMPNEW(<4 x i32> %a, <4 x i32> %b) { 79entry: 80 %0 = tail call <4 x i32> @llvm.ppc.altivec.vcmpnew(<4 x i32> %a, <4 x i32> %b) 81 ret <4 x i32> %0 82; CHECK-LABEL: testVCMPNEW 83; CHECK: vcmpnew 2, 2 84} 85 86; Function Attrs: nounwind readnone 87declare <4 x i32> @llvm.ppc.altivec.vcmpnew(<4 x i32>, <4 x i32>) 88 89; Function Attrs: nounwind readnone 90define <4 x i32> @testVCMPNEZW(<4 x i32> %a, <4 x i32> %b) { 91entry: 92 %0 = tail call <4 x i32> @llvm.ppc.altivec.vcmpnezw(<4 x i32> %a, <4 x i32> %b) 93 ret <4 x i32> %0 94; CHECK-LABEL: testVCMPNEZW 95; CHECK: vcmpnezw 2, 2 96} 97 98; Function Attrs: nounwind readnone 99declare <4 x i32> @llvm.ppc.altivec.vcmpnezw(<4 x i32>, <4 x i32>) 100 101; Function Attrs: nounwind readnone 102define <16 x i8> @testVCNTTZB(<16 x i8> %a) { 103entry: 104 %0 = tail call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false) 105 ret <16 x i8> %0 106; CHECK-LABEL: testVCNTTZB 107; CHECK: vctzb 2, 2 108} 109 110; Function Attrs: nounwind readnone 111define <8 x i16> @testVCNTTZH(<8 x i16> %a) { 112entry: 113 %0 = tail call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false) 114 ret <8 x i16> %0 115; CHECK-LABEL: testVCNTTZH 116; CHECK: vctzh 2, 2 117} 118 119; Function Attrs: nounwind readnone 120define <4 x i32> @testVCNTTZW(<4 x i32> %a) { 121entry: 122 %0 = tail call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false) 123 ret <4 x i32> %0 124; CHECK-LABEL: testVCNTTZW 125; CHECK: vctzw 2, 2 126} 127 128; Function Attrs: nounwind readnone 129define <2 x i64> @testVCNTTZD(<2 x i64> %a) { 130entry: 131 %0 = tail call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false) 132 ret <2 x i64> %0 133; CHECK-LABEL: testVCNTTZD 134; CHECK: vctzd 2, 2 135} 136 137; Function Attrs: nounwind readnone 138declare <16 x i8> @llvm.cttz.v16i8(<16 x i8>, i1) 139 140; Function Attrs: nounwind readnone 141declare <8 x i16> @llvm.cttz.v8i16(<8 x i16>, i1) 142 143; Function Attrs: nounwind readnone 144declare <4 x i32> @llvm.cttz.v4i32(<4 x i32>, i1) 145 146; Function Attrs: nounwind readnone 147declare <2 x i64> @llvm.cttz.v2i64(<2 x i64>, i1) 148