1 ; Test of subtraction that involves a constant as the first operand
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
5 ; Check highest 16-bit signed int immediate value.
6 define i64 @f1(i64 %a) {
8 ; CHECK: lghi %r0, 32767
9 ; CHECK: sgrk %r2, %r0, %r2
11 %sub = sub i64 32767, %a
14 ; Check highest 32-bit signed int immediate value.
15 define i64 @f2(i64 %a) {
17 ; CHECK: lgfi %r0, 2147483647
18 ; CHECK: sgrk %r2, %r0, %r2
20 %sub = sub i64 2147483647, %a