1; Test 32-bit ORs in which the second operand is constant. 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s 4 5; Check the lowest useful OILL value. 6define i32 @f1(i32 %a) { 7; CHECK-LABEL: f1: 8; CHECK: oill %r2, 1 9; CHECK: br %r14 10 %or = or i32 %a, 1 11 ret i32 %or 12} 13 14; Check the high end of the OILL range. 15define i32 @f2(i32 %a) { 16; CHECK-LABEL: f2: 17; CHECK: oill %r2, 65535 18; CHECK: br %r14 19 %or = or i32 %a, 65535 20 ret i32 %or 21} 22 23; Check the lowest useful OILH range, which is the next value up. 24define i32 @f3(i32 %a) { 25; CHECK-LABEL: f3: 26; CHECK: oilh %r2, 1 27; CHECK: br %r14 28 %or = or i32 %a, 65536 29 ret i32 %or 30} 31 32; Check the lowest useful OILF value, which is the next value up again. 33define i32 @f4(i32 %a) { 34; CHECK-LABEL: f4: 35; CHECK: oilf %r2, 65537 36; CHECK: br %r14 37 %or = or i32 %a, 65537 38 ret i32 %or 39} 40 41; Check the high end of the OILH range. 42define i32 @f5(i32 %a) { 43; CHECK-LABEL: f5: 44; CHECK: oilh %r2, 65535 45; CHECK: br %r14 46 %or = or i32 %a, -65536 47 ret i32 %or 48} 49 50; Check the next value up, which must use OILF instead. 51define i32 @f6(i32 %a) { 52; CHECK-LABEL: f6: 53; CHECK: oilf %r2, 4294901761 54; CHECK: br %r14 55 %or = or i32 %a, -65535 56 ret i32 %or 57} 58 59; Check the highest useful OILF value. 60define i32 @f7(i32 %a) { 61; CHECK-LABEL: f7: 62; CHECK: oilf %r2, 4294967294 63; CHECK: br %r14 64 %or = or i32 %a, -2 65 ret i32 %or 66} 67