brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · c3c1ae3 Raw
72 lines · plain
1; Test insertions of 16-bit constants into one half of an i32.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s4 5; Check the lowest useful IILL value.  (We use NILL rather than IILL6; to clear 16 bits.)7define i32 @f1(i32 %a) {8; CHECK-LABEL: f1:9; CHECK-NOT: ni10; CHECK: iill %r2, 111; CHECK: br %r1412  %and = and i32 %a, 429490176013  %or = or i32 %and, 114  ret i32 %or15}16 17; Check a middle value.18define i32 @f2(i32 %a) {19; CHECK-LABEL: f2:20; CHECK-NOT: ni21; CHECK: iill %r2, 3276922; CHECK: br %r1423  %and = and i32 %a, -6553624  %or = or i32 %and, 3276925  ret i32 %or26}27 28; Check the highest useful IILL value.  (We use OILL rather than IILL29; to set 16 bits.)30define i32 @f3(i32 %a) {31; CHECK-LABEL: f3:32; CHECK-NOT: ni33; CHECK: iill %r2, 6553434; CHECK: br %r1435  %and = and i32 %a, 429490176036  %or = or i32 %and, 6553437  ret i32 %or38}39 40; Check the lowest useful IILH value.41define i32 @f4(i32 %a) {42; CHECK-LABEL: f4:43; CHECK-NOT: ni44; CHECK: iilh %r2, 145; CHECK: br %r1446  %and = and i32 %a, 6553547  %or = or i32 %and, 6553648  ret i32 %or49}50 51; Check a middle value.52define i32 @f5(i32 %a) {53; CHECK-LABEL: f5:54; CHECK-NOT: ni55; CHECK: iilh %r2, 3276756; CHECK: br %r1457  %and = and i32 %a, 6553558  %or = or i32 %and, 214741811259  ret i32 %or60}61 62; Check the highest useful IILH value.63define i32 @f6(i32 %a) {64; CHECK-LABEL: f6:65; CHECK-NOT: ni66; CHECK: iilh %r2, 6553467; CHECK: br %r1468  %and = and i32 %a, 6553569  %or = or i32 %and, -13107270  ret i32 %or71}72