1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; Test 128-bit arithmetic in vector registers on z13
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
6 declare i128 @llvm.cttz.i128(i128, i1)
8 define i128 @f1(i128 %a) {
11 ; CHECK-NEXT: vl %v0, 0(%r3), 3
12 ; CHECK-NEXT: vgbm %v1, 65535
13 ; CHECK-NEXT: vaq %v1, %v0, %v1
14 ; CHECK-NEXT: vnc %v0, %v1, %v0
15 ; CHECK-NEXT: vpopct %v0, %v0, 0
16 ; CHECK-NEXT: vgbm %v1, 0
17 ; CHECK-NEXT: vsumb %v0, %v0, %v1
18 ; CHECK-NEXT: vsumgf %v0, %v0, %v1
19 ; CHECK-NEXT: vsumqg %v0, %v0, %v1
20 ; CHECK-NEXT: vst %v0, 0(%r2), 3
22 %res = tail call i128 @llvm.cttz.i128(i128 %a, i1 false)
26 define i128 @f2(i128 %a) {
29 ; CHECK-NEXT: vl %v0, 0(%r3), 3
30 ; CHECK-NEXT: vgbm %v1, 65535
31 ; CHECK-NEXT: vaq %v1, %v0, %v1
32 ; CHECK-NEXT: vnc %v0, %v1, %v0
33 ; CHECK-NEXT: vpopct %v0, %v0, 0
34 ; CHECK-NEXT: vgbm %v1, 0
35 ; CHECK-NEXT: vsumb %v0, %v0, %v1
36 ; CHECK-NEXT: vsumgf %v0, %v0, %v1
37 ; CHECK-NEXT: vsumqg %v0, %v0, %v1
38 ; CHECK-NEXT: vst %v0, 0(%r2), 3
40 %res = tail call i128 @llvm.cttz.i128(i128 %a, i1 true)