81 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=aarch64-none-elf -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD3; RUN: llc -mtriple=aarch64-none-elf -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI4 5define i32 @mask_pair(i32 %x, i32 %y) {6; CHECK-SD-LABEL: mask_pair:7; CHECK-SD: // %bb.0:8; CHECK-SD-NEXT: lsr w8, w0, w19; CHECK-SD-NEXT: lsl w0, w8, w110; CHECK-SD-NEXT: ret11;12; CHECK-GI-LABEL: mask_pair:13; CHECK-GI: // %bb.0:14; CHECK-GI-NEXT: mov w8, #-1 // =0xffffffff15; CHECK-GI-NEXT: lsl w8, w8, w116; CHECK-GI-NEXT: and w0, w8, w017; CHECK-GI-NEXT: ret18 %shl = shl nsw i32 -1, %y19 %and = and i32 %shl, %x20 ret i32 %and21}22 23define i64 @mask_pair_64(i64 %x, i64 %y) {24; CHECK-SD-LABEL: mask_pair_64:25; CHECK-SD: // %bb.0:26; CHECK-SD-NEXT: lsr x8, x0, x127; CHECK-SD-NEXT: lsl x0, x8, x128; CHECK-SD-NEXT: ret29;30; CHECK-GI-LABEL: mask_pair_64:31; CHECK-GI: // %bb.0:32; CHECK-GI-NEXT: mov x8, #-1 // =0xffffffffffffffff33; CHECK-GI-NEXT: lsl x8, x8, x134; CHECK-GI-NEXT: and x0, x8, x035; CHECK-GI-NEXT: ret36 %shl = shl nsw i64 -1, %y37 %and = and i64 %shl, %x38 ret i64 %and39}40 41define i128 @mask_pair_128(i128 %x, i128 %y) {42; CHECK-SD-LABEL: mask_pair_128:43; CHECK-SD: // %bb.0:44; CHECK-SD-NEXT: mov x8, #-1 // =0xffffffffffffffff45; CHECK-SD-NEXT: mvn w9, w246; CHECK-SD-NEXT: mov x10, #9223372036854775807 // =0x7fffffffffffffff47; CHECK-SD-NEXT: lsl x8, x8, x248; CHECK-SD-NEXT: lsr x9, x10, x949; CHECK-SD-NEXT: tst x2, #0x4050; CHECK-SD-NEXT: orr x9, x8, x951; CHECK-SD-NEXT: csel x9, x8, x9, ne52; CHECK-SD-NEXT: csel x8, xzr, x8, ne53; CHECK-SD-NEXT: and x0, x8, x054; CHECK-SD-NEXT: and x1, x9, x155; CHECK-SD-NEXT: ret56;57; CHECK-GI-LABEL: mask_pair_128:58; CHECK-GI: // %bb.0:59; CHECK-GI-NEXT: mov w8, #64 // =0x4060; CHECK-GI-NEXT: mov x9, #-1 // =0xffffffffffffffff61; CHECK-GI-NEXT: sub x10, x2, #6462; CHECK-GI-NEXT: sub x8, x8, x263; CHECK-GI-NEXT: lsl x11, x9, x264; CHECK-GI-NEXT: cmp x2, #6465; CHECK-GI-NEXT: lsr x8, x9, x866; CHECK-GI-NEXT: lsl x9, x9, x1067; CHECK-GI-NEXT: csel x10, x11, xzr, lo68; CHECK-GI-NEXT: orr x8, x8, x1169; CHECK-GI-NEXT: and x0, x10, x070; CHECK-GI-NEXT: csel x8, x8, x9, lo71; CHECK-GI-NEXT: cmp x2, #072; CHECK-GI-NEXT: csinv x8, x8, xzr, ne73; CHECK-GI-NEXT: and x1, x8, x174; CHECK-GI-NEXT: ret75 %shl = shl nsw i128 -1, %y76 %and = and i128 %shl, %x77 ret i128 %and78}79;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:80; CHECK: {{.*}}81