67 lines · plain
1; Test 32-bit ORs in which the second operand is constant.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s4 5; Check the lowest useful OILL value.6define i32 @f1(i32 %a) {7; CHECK-LABEL: f1:8; CHECK: oill %r2, 19; CHECK: br %r1410 %or = or i32 %a, 111 ret i32 %or12}13 14; Check the high end of the OILL range.15define i32 @f2(i32 %a) {16; CHECK-LABEL: f2:17; CHECK: oill %r2, 6553518; CHECK: br %r1419 %or = or i32 %a, 6553520 ret i32 %or21}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, 127; CHECK: br %r1428 %or = or i32 %a, 6553629 ret i32 %or30}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, 6553736; CHECK: br %r1437 %or = or i32 %a, 6553738 ret i32 %or39}40 41; Check the high end of the OILH range.42define i32 @f5(i32 %a) {43; CHECK-LABEL: f5:44; CHECK: oilh %r2, 6553545; CHECK: br %r1446 %or = or i32 %a, -6553647 ret i32 %or48}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, 429490176154; CHECK: br %r1455 %or = or i32 %a, -6553556 ret i32 %or57}58 59; Check the highest useful OILF value.60define i32 @f7(i32 %a) {61; CHECK-LABEL: f7:62; CHECK: oilf %r2, 429496729463; CHECK: br %r1464 %or = or i32 %a, -265 ret i32 %or66}67