1 ; Test the "I" constraint (8-bit unsigned constants). 2 ; 3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -no-integrated-as | FileCheck %s 4 5 ; Test 1 below the first valid value. 6 define i32 @f1() { 7 ; CHECK-LABEL: f1: 8 ; CHECK: lhi [[REG:%r[0-5]]], -1 9 ; CHECK: blah %r2 [[REG]] 10 ; CHECK: br %r14 11 %val = call i32 asm "blah $0 $1", "=&r,rI" (i32 -1) 12 ret i32 %val 13 } 14 15 ; Test the first valid value. 16 define i32 @f2() { 17 ; CHECK-LABEL: f2: 18 ; CHECK: blah %r2 0 19 ; CHECK: br %r14 20 %val = call i32 asm "blah $0 $1", "=&r,rI" (i32 0) 21 ret i32 %val 22 } 23 24 ; Test the last valid value. 25 define i32 @f3() { 26 ; CHECK-LABEL: f3: 27 ; CHECK: blah %r2 255 28 ; CHECK: br %r14 29 %val = call i32 asm "blah $0 $1", "=&r,rI" (i32 255) 30 ret i32 %val 31 } 32 33 ; Test 1 above the last valid value. 34 define i32 @f4() { 35 ; CHECK-LABEL: f4: 36 ; CHECK: lhi [[REG:%r[0-5]]], 256 37 ; CHECK: blah %r2 [[REG]] 38 ; CHECK: br %r14 39 %val = call i32 asm "blah $0 $1", "=&r,rI" (i32 256) 40 ret i32 %val 41 } 42