1 ; Test 128-bit subtraction when the distinct-operands facility is available.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
5 ; Test the case where both operands are in registers.
6 define i64 @f1(i64 %a, i64 %b, i64 %c, i64 %d, ptr %ptr) {
8 ; CHECK: slgrk %r2, %r4, %r5
11 %x1 = insertelement <2 x i64> undef, i64 %b, i32 0
12 %x2 = insertelement <2 x i64> %x1, i64 %c, i32 1
13 %x = bitcast <2 x i64> %x2 to i128
14 %y2 = insertelement <2 x i64> %x1, i64 %d, i32 1
15 %y = bitcast <2 x i64> %y2 to i128
16 %sub = sub i128 %x, %y
17 %subv = bitcast i128 %sub to <2 x i64>
18 %high = extractelement <2 x i64> %subv, i32 0
19 store i64 %high, ptr %ptr
20 %low = extractelement <2 x i64> %subv, i32 1