Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

173 lines
3.9 KiB
LLVM

; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
define signext i8 @func1(i8 signext %0, i8 signext %1) {
; CHECK-LABEL: func1:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: sll %s0, %s0, 56
; CHECK-NEXT: sra.l %s0, %s0, 56
; CHECK-NEXT: b.l.t (, %s10)
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = shl i32 %3, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}
define signext i16 @func2(i16 signext %0, i16 signext %1) {
; CHECK-LABEL: func2:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: sll %s0, %s0, 48
; CHECK-NEXT: sra.l %s0, %s0, 48
; CHECK-NEXT: b.l.t (, %s10)
%3 = sext i16 %0 to i32
%4 = sext i16 %1 to i32
%5 = shl i32 %3, %4
%6 = trunc i32 %5 to i16
ret i16 %6
}
define i32 @func3(i32 %0, i32 %1) {
; CHECK-LABEL: func3:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%3 = shl i32 %0, %1
ret i32 %3
}
define i64 @func4(i64 %0, i64 %1) {
; CHECK-LABEL: func4:
; CHECK: # %bb.0:
; CHECK-NEXT: sll %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%3 = shl i64 %0, %1
ret i64 %3
}
define zeroext i8 @func6(i8 zeroext %0, i8 zeroext %1) {
; CHECK-LABEL: func6:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: and %s0, %s0, (56)0
; CHECK-NEXT: b.l.t (, %s10)
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = shl i32 %3, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}
define zeroext i16 @func7(i16 zeroext %0, i16 zeroext %1) {
; CHECK-LABEL: func7:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: and %s0, %s0, (48)0
; CHECK-NEXT: b.l.t (, %s10)
%3 = zext i16 %0 to i32
%4 = zext i16 %1 to i32
%5 = shl i32 %3, %4
%6 = trunc i32 %5 to i16
ret i16 %6
}
define i32 @func8(i32 %0, i32 %1) {
; CHECK-LABEL: func8:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%3 = shl i32 %0, %1
ret i32 %3
}
define i64 @func9(i64 %0, i64 %1) {
; CHECK-LABEL: func9:
; CHECK: # %bb.0:
; CHECK-NEXT: sll %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%3 = shl i64 %0, %1
ret i64 %3
}
define signext i8 @func11(i8 signext %0) {
; CHECK-LABEL: func11:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: sll %s0, %s0, 56
; CHECK-NEXT: sra.l %s0, %s0, 56
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i8 %0, 5
ret i8 %2
}
define signext i16 @func12(i16 signext %0) {
; CHECK-LABEL: func12:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: sll %s0, %s0, 48
; CHECK-NEXT: sra.l %s0, %s0, 48
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i16 %0, 5
ret i16 %2
}
define i32 @func13(i32 %0) {
; CHECK-LABEL: func13:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i32 %0, 5
ret i32 %2
}
define i64 @func14(i64 %0) {
; CHECK-LABEL: func14:
; CHECK: # %bb.0:
; CHECK-NEXT: sll %s0, %s0, 5
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i64 %0, 5
ret i64 %2
}
define zeroext i8 @func16(i8 zeroext %0) {
; CHECK-LABEL: func16:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: lea %s1, 224
; CHECK-NEXT: and %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i8 %0, 5
ret i8 %2
}
define zeroext i16 @func17(i16 zeroext %0) {
; CHECK-LABEL: func17:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: lea %s1, 65504
; CHECK-NEXT: and %s0, %s0, %s1
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i16 %0, 5
ret i16 %2
}
define i32 @func18(i32 %0) {
; CHECK-LABEL: func18:
; CHECK: # %bb.0:
; CHECK-NEXT: sla.w.sx %s0, %s0, 5
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i32 %0, 5
ret i32 %2
}
define i64 @func19(i64 %0) {
; CHECK-LABEL: func19:
; CHECK: # %bb.0:
; CHECK-NEXT: sll %s0, %s0, 5
; CHECK-NEXT: b.l.t (, %s10)
%2 = shl i64 %0, 5
ret i64 %2
}