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
95 lines
3.5 KiB
YAML
95 lines
3.5 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
|
|
--- |
|
|
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
|
|
target triple = "aarch64"
|
|
|
|
@x = dso_local global i32 -32768, align 4
|
|
|
|
define dso_local i32 @check_sext_not_lost(ptr %ptr) {
|
|
entry:
|
|
%ptr.addr = alloca ptr, align 8
|
|
store ptr %ptr, ptr %ptr.addr, align 8
|
|
%0 = load ptr, ptr %ptr.addr, align 8
|
|
%1 = load i32, ptr @x, align 4
|
|
%sub = sub nsw i32 %1, 32768
|
|
%conv = trunc i32 %sub to i16
|
|
%idxprom = sext i16 %conv to i64
|
|
%arrayidx = getelementptr inbounds i32, ptr %0, i64 %idxprom
|
|
%2 = load i32, ptr %arrayidx, align 4
|
|
ret i32 %2
|
|
}
|
|
|
|
...
|
|
---
|
|
name: check_sext_not_lost
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
registers:
|
|
- { id: 0, class: gpr }
|
|
- { id: 1, class: gpr }
|
|
- { id: 2, class: gpr }
|
|
- { id: 3, class: gpr }
|
|
- { id: 4, class: gpr }
|
|
- { id: 5, class: gpr }
|
|
- { id: 6, class: gpr }
|
|
- { id: 7, class: _ }
|
|
- { id: 8, class: gpr }
|
|
- { id: 9, class: _ }
|
|
- { id: 10, class: gpr }
|
|
- { id: 11, class: gpr }
|
|
- { id: 12, class: _ }
|
|
- { id: 13, class: gpr }
|
|
- { id: 14, class: gpr }
|
|
- { id: 15, class: gpr64 }
|
|
- { id: 16, class: gpr }
|
|
liveins:
|
|
- { reg: '$x0' }
|
|
frameInfo:
|
|
maxAlignment: 8
|
|
maxCallFrameSize: 0
|
|
stack:
|
|
- { id: 0, name: ptr.addr, size: 8, alignment: 8 }
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: $x0
|
|
|
|
; CHECK-LABEL: name: check_sext_not_lost
|
|
; CHECK: liveins: $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY [[COPY]]
|
|
; CHECK-NEXT: STRXui [[COPY1]], %stack.0.ptr.addr, 0 :: (store (p0) into %ir.ptr.addr)
|
|
; CHECK-NEXT: [[LDRXui:%[0-9]+]]:gpr64common = LDRXui %stack.0.ptr.addr, 0 :: (dereferenceable load (p0) from %ir.ptr.addr)
|
|
; CHECK-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @x
|
|
; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32common = LDRWui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @x :: (dereferenceable load (s32) from @x)
|
|
; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = nsw SUBSWri [[LDRWui]], 8, 12, implicit-def dead $nzcv
|
|
; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
|
|
; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[SUBSWri]], %subreg.sub_32
|
|
; CHECK-NEXT: [[SBFMXri:%[0-9]+]]:gpr64 = SBFMXri [[INSERT_SUBREG]], 0, 15
|
|
; CHECK-NEXT: [[LDRWroX:%[0-9]+]]:gpr32 = LDRWroX [[LDRXui]], [[SBFMXri]], 0, 1 :: (load (s32) from %ir.arrayidx)
|
|
; CHECK-NEXT: $w0 = COPY [[LDRWroX]]
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%0:gpr(p0) = COPY $x0
|
|
%1:gpr(p0) = G_FRAME_INDEX %stack.0.ptr.addr
|
|
G_STORE %0(p0), %1(p0) :: (store (p0) into %ir.ptr.addr)
|
|
%2:gpr(p0) = G_LOAD %1(p0) :: (dereferenceable load (p0) from %ir.ptr.addr)
|
|
%15:gpr64(p0) = ADRP target-flags(aarch64-page) @x
|
|
%4:gpr(p0) = G_ADD_LOW %15(p0), target-flags(aarch64-pageoff, aarch64-nc) @x
|
|
%3:gpr(i32) = G_LOAD %4(p0) :: (dereferenceable load (s32) from @x)
|
|
%5:gpr(i32) = G_CONSTANT i32 32768
|
|
%6:gpr(i32) = nsw G_SUB %3, %5
|
|
%16:gpr(i64) = G_ANYEXT %6(i32)
|
|
%8:gpr(i64) = G_SEXT_INREG %16, 16
|
|
%14:gpr(i64) = G_CONSTANT i64 2
|
|
%10:gpr(i64) = G_SHL %8, %14(i64)
|
|
%11:gpr(p0) = G_PTR_ADD %2, %10(i64)
|
|
%13:gpr(i32) = G_LOAD %11(p0) :: (load (s32) from %ir.arrayidx)
|
|
$w0 = COPY %13(i32)
|
|
RET_ReallyLR implicit $w0
|
|
|
|
...
|