1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; Test 128-bit absolute value in vector registers on z13
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
6 define i128 @f1(i128 %src) {
9 ; CHECK-NEXT: vl %v0, 0(%r3), 3
10 ; CHECK-NEXT: vrepib %v1, 127
11 ; CHECK-NEXT: vsrab %v2, %v0, %v1
12 ; CHECK-NEXT: vsra %v1, %v2, %v1
13 ; CHECK-NEXT: vx %v0, %v0, %v1
14 ; CHECK-NEXT: vsq %v0, %v0, %v1
15 ; CHECK-NEXT: vst %v0, 0(%r2), 3
17 %cmp = icmp slt i128 %src, 0
18 %neg = sub i128 0, %src
19 %res = select i1 %cmp, i128 %neg, i128 %src