CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
247 lines
7.1 KiB
YAML
247 lines
7.1 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
|
|
# RUN: llc -mtriple=riscv32 -run-pass=instruction-select \
|
|
# RUN: -simplify-mir -verify-machineinstrs %s -o - | FileCheck %s
|
|
|
|
# This 32-bit version doesn't have tests for zext, because there is no legal type to zext from.
|
|
---
|
|
name: shl
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[COPY1]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%3:gprb(s32) = G_SHL %0, %1
|
|
$x10 = COPY %3(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_and
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_and
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[COPY1]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 31
|
|
%3:gprb(s32) = G_AND %1, %2
|
|
%4:gprb(s32) = G_SHL %0, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_and_with_simplified_mask
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_and_with_simplified_mask
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[COPY1]], 31
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[ANDI]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 31
|
|
%3:gprb(s32) = G_AND %1, %2
|
|
%4:gprb(s32) = G_CONSTANT i32 31
|
|
%5:gprb(s32) = G_AND %3, %4
|
|
%6:gprb(s32) = G_SHL %0, %5(s32)
|
|
$x10 = COPY %6(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_add
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_add
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[COPY1]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 32
|
|
%3:gprb(s32) = G_ADD %1, %2
|
|
%4:gprb(s32) = G_SHL %0, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_sub
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_sub
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[SUB:%[0-9]+]]:gpr = SUB $x0, [[COPY1]]
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[SUB]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 32
|
|
%3:gprb(s32) = G_SUB %2, %1
|
|
%4:gprb(s32) = G_SHL %0, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_bitwise_not
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_bitwise_not
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[COPY1]], -1
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[XORI]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 -1
|
|
%3:gprb(s32) = G_SUB %2, %1
|
|
%4:gprb(s32) = G_SHL %0, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: shl_bitwise_not_2
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: shl_bitwise_not_2
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[COPY1]], -1
|
|
; CHECK-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[XORI]]
|
|
; CHECK-NEXT: $x10 = COPY [[SLL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 31
|
|
%3:gprb(s32) = G_SUB %2, %1
|
|
%4:gprb(s32) = G_SHL %0, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: srl_and_needed
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: srl_and_needed
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[COPY]], 15
|
|
; CHECK-NEXT: [[SRL:%[0-9]+]]:gpr = SRL [[COPY1]], [[ANDI]]
|
|
; CHECK-NEXT: $x10 = COPY [[SRL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 15
|
|
%3:gprb(s32) = G_AND %0, %2
|
|
%4:gprb(s32) = G_LSHR %1, %3(s32)
|
|
$x10 = COPY %4(s32)
|
|
PseudoRET implicit $x10
|
|
...
|
|
|
|
---
|
|
name: srl_and_eliminated
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $x10, $x11
|
|
|
|
; CHECK-LABEL: name: srl_and_eliminated
|
|
; CHECK: liveins: $x10, $x11
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
|
|
; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[COPY]], 47
|
|
; CHECK-NEXT: [[SRL:%[0-9]+]]:gpr = SRL [[COPY1]], [[ANDI]]
|
|
; CHECK-NEXT: $x10 = COPY [[SRL]]
|
|
; CHECK-NEXT: PseudoRET implicit $x10
|
|
%0:gprb(s32) = COPY $x10
|
|
%1:gprb(s32) = COPY $x11
|
|
%2:gprb(s32) = G_CONSTANT i32 15
|
|
%3:gprb(s32) = G_CONSTANT i32 47
|
|
%4:gprb(s32) = G_AND %0, %3
|
|
%5:gprb(s32) = G_AND %4, %2
|
|
%6:gprb(s32) = G_LSHR %1, %5(s32)
|
|
$x10 = COPY %6(s32)
|
|
PseudoRET implicit $x10
|
|
...
|