Home | History | Annotate | Download | only in SystemZ
      1 ; Test 128-bit subtraction when the distinct-operands facility is available.
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
      4 
      5 ; Test the case where both operands are in registers.
      6 define i64 @f1(i64 %a, i64 %b, i64 %c, i64 %d, i64 *%ptr) {
      7 ; CHECK-LABEL: f1:
      8 ; CHECK: slgrk %r2, %r4, %r5
      9 ; CHECK: slbgr
     10 ; CHECK: br %r14
     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, i64 *%ptr
     20   %low = extractelement <2 x i64> %subv, i32 1
     21   ret i64 %low
     22 }
     23