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.9 KiB
LLVM
95 lines
3.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=thumbv7s-none-eabi %s -o - | FileCheck %s
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8> %shuffle.i.i307, <8 x i8> %shuffle.i27.i308, <8 x i8> %vtbl2.i25.i)
|
|
|
|
; Check that we get the motivating example:
|
|
; The bitcasts force the values to go through the GPRs, whereas
|
|
; they are defined on VPRs and used on VPRs.
|
|
;
|
|
define void @motivatingExample(ptr %addr, ptr %addr2) {
|
|
; CHECK-LABEL: motivatingExample:
|
|
; CHECK: @ %bb.0:
|
|
; CHECK-NEXT: vld1.64 {d16, d17}, [r0]
|
|
; CHECK-NEXT: vldr d18, [r1]
|
|
; CHECK-NEXT: vtbl.8 d16, {d16, d17}, d18
|
|
; CHECK-NEXT: vstr d16, [r1]
|
|
; CHECK-NEXT: bx lr
|
|
%shuffle.i.bc.i309 = load <2 x i64>, ptr %addr
|
|
%vtbl2.i25.i = load <8 x i8>, ptr %addr2
|
|
%shuffle.i.extract.i310 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 0
|
|
%shuffle.i27.extract.i311 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 1
|
|
%tmp45 = bitcast i64 %shuffle.i.extract.i310 to <8 x i8>
|
|
%tmp46 = bitcast i64 %shuffle.i27.extract.i311 to <8 x i8>
|
|
%vtbl2.i25.i313 = tail call <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8> %tmp45, <8 x i8> %tmp46, <8 x i8> %vtbl2.i25.i)
|
|
store <8 x i8> %vtbl2.i25.i313, ptr %addr2
|
|
ret void
|
|
}
|
|
|
|
; Check that we do not perform the transformation for dynamic index.
|
|
define void @dynamicIndex(ptr %addr, ptr %addr2, i32 %index) {
|
|
; CHECK-LABEL: dynamicIndex:
|
|
; CHECK: @ %bb.0:
|
|
; CHECK-NEXT: .save {r4, r6, r7, lr}
|
|
; CHECK-NEXT: push {r4, r6, r7, lr}
|
|
; CHECK-NEXT: .setfp r7, sp, #8
|
|
; CHECK-NEXT: add r7, sp, #8
|
|
; CHECK-NEXT: .pad #16
|
|
; CHECK-NEXT: sub sp, #16
|
|
; CHECK-NEXT: mov r4, sp
|
|
; CHECK-NEXT: bfc r4, #0, #4
|
|
; CHECK-NEXT: mov sp, r4
|
|
; CHECK-NEXT: movs r3, #2
|
|
; CHECK-NEXT: vld1.64 {d16, d17}, [r0]
|
|
; CHECK-NEXT: and.w r0, r3, r2, lsl #1
|
|
; CHECK-NEXT: mov r12, sp
|
|
; CHECK-NEXT: mov r3, r12
|
|
; CHECK-NEXT: sub.w r4, r7, #8
|
|
; CHECK-NEXT: lsls r0, r0, #2
|
|
; CHECK-NEXT: vst1.64 {d16, d17}, [r3:128], r0
|
|
; CHECK-NEXT: lsls r0, r2, #1
|
|
; CHECK-NEXT: adds r0, #1
|
|
; CHECK-NEXT: and r0, r0, #3
|
|
; CHECK-NEXT: ldr r2, [r3]
|
|
; CHECK-NEXT: vldr d18, [r1]
|
|
; CHECK-NEXT: orr.w r0, r12, r0, lsl #2
|
|
; CHECK-NEXT: ldr r0, [r0]
|
|
; CHECK-NEXT: vmov d16, r2, r0
|
|
; CHECK-NEXT: vtbl.8 d16, {d16, d17}, d18
|
|
; CHECK-NEXT: vstr d16, [r1]
|
|
; CHECK-NEXT: mov sp, r4
|
|
; CHECK-NEXT: pop {r4, r6, r7, pc}
|
|
%shuffle.i.bc.i309 = load <2 x i64>, ptr %addr
|
|
%vtbl2.i25.i = load <8 x i8>, ptr %addr2
|
|
%shuffle.i.extract.i310 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 %index
|
|
%shuffle.i27.extract.i311 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 1
|
|
%tmp45 = bitcast i64 %shuffle.i.extract.i310 to <8 x i8>
|
|
%tmp46 = bitcast i64 %shuffle.i27.extract.i311 to <8 x i8>
|
|
%vtbl2.i25.i313 = tail call <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8> %tmp45, <8 x i8> %tmp46, <8 x i8> %vtbl2.i25.i)
|
|
store <8 x i8> %vtbl2.i25.i313, ptr %addr2
|
|
ret void
|
|
}
|
|
|
|
; Check that we do not perform the transformation when there are several uses
|
|
; of the result of the bitcast.
|
|
define i64 @severalUses(ptr %addr, ptr %addr2) {
|
|
; CHECK-LABEL: severalUses:
|
|
; CHECK: @ %bb.0:
|
|
; CHECK-NEXT: vld1.64 {d16, d17}, [r0]
|
|
; CHECK-NEXT: vmov r0, r2, d16
|
|
; CHECK-NEXT: vldr d18, [r1]
|
|
; CHECK-NEXT: vtbl.8 d16, {d16, d17}, d18
|
|
; CHECK-NEXT: vstr d16, [r1]
|
|
; CHECK-NEXT: mov r1, r2
|
|
; CHECK-NEXT: bx lr
|
|
%shuffle.i.bc.i309 = load <2 x i64>, ptr %addr
|
|
%vtbl2.i25.i = load <8 x i8>, ptr %addr2
|
|
%shuffle.i.extract.i310 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 0
|
|
%shuffle.i27.extract.i311 = extractelement <2 x i64> %shuffle.i.bc.i309, i32 1
|
|
%tmp45 = bitcast i64 %shuffle.i.extract.i310 to <8 x i8>
|
|
%tmp46 = bitcast i64 %shuffle.i27.extract.i311 to <8 x i8>
|
|
%vtbl2.i25.i313 = tail call <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8> %tmp45, <8 x i8> %tmp46, <8 x i8> %vtbl2.i25.i)
|
|
store <8 x i8> %vtbl2.i25.i313, ptr %addr2
|
|
ret i64 %shuffle.i.extract.i310
|
|
}
|