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

128 lines
2.9 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64-ibm-aix-xcoff -vec-extabi < %s | FileCheck %s
define i64 @test1(i64 %x) {
; CHECK-LABEL: test1:
; CHECK: # %bb.0:
; CHECK-NEXT: mulli 3, 3, 625
; CHECK-NEXT: sldi 3, 3, 36
; CHECK-NEXT: blr
%y = mul i64 %x, 42949672960000
ret i64 %y
}
define i64 @test2(i64 %x) {
; CHECK-LABEL: test2:
; CHECK: # %bb.0:
; CHECK-NEXT: mulli 3, 3, -625
; CHECK-NEXT: sldi 3, 3, 36
; CHECK-NEXT: blr
%y = mul i64 %x, -42949672960000
ret i64 %y
}
define i64 @test3(i64 %x) {
; CHECK-LABEL: test3:
; CHECK: # %bb.0:
; CHECK-NEXT: mulli 3, 3, 297
; CHECK-NEXT: sldi 3, 3, 14
; CHECK-NEXT: blr
%y = mul i64 %x, 4866048
ret i64 %y
}
define i64 @test4(i64 %x) {
; CHECK-LABEL: test4:
; CHECK: # %bb.0:
; CHECK-NEXT: mulli 3, 3, -297
; CHECK-NEXT: sldi 3, 3, 14
; CHECK-NEXT: blr
%y = mul i64 %x, -4866048
ret i64 %y
}
define i64 @test5(i64 %x) {
; CHECK-LABEL: test5:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 12
; CHECK-NEXT: sldi 3, 3, 32
; CHECK-NEXT: add 3, 3, 4
; CHECK-NEXT: blr
%y = mul i64 %x, 4294971392
ret i64 %y
}
define i64 @test6(i64 %x) {
; CHECK-LABEL: test6:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 12
; CHECK-NEXT: sldi 3, 3, 32
; CHECK-NEXT: add 3, 3, 4
; CHECK-NEXT: neg 3, 3
; CHECK-NEXT: blr
%y = mul i64 %x, -4294971392
ret i64 %y
}
define i64 @test7(i64 %x) {
; CHECK-LABEL: test7:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 34
; CHECK-NEXT: sldi 3, 3, 13
; CHECK-NEXT: sub 3, 4, 3
; CHECK-NEXT: blr
%y = mul i64 %x, 17179860992
ret i64 %y
}
define i64 @test8(i64 %x) {
; CHECK-LABEL: test8:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 13
; CHECK-NEXT: sldi 3, 3, 34
; CHECK-NEXT: sub 3, 4, 3
; CHECK-NEXT: blr
%y = mul i64 %x, -17179860992
ret i64 %y
}
define i64 @test9(i64 %x) {
; CHECK-LABEL: test9:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 12
; CHECK-NEXT: sldi 5, 3, 32
; CHECK-NEXT: add 4, 5, 4
; CHECK-NEXT: mulli 3, 3, 8193
; CHECK-NEXT: sldi 3, 3, 19
; CHECK-NEXT: sub 3, 4, 3
; CHECK-NEXT: blr
%y = mul i64 %x, 4294971392
%z = mul i64 %x, 4295491584
%res = sub i64 %y, %z
ret i64 %res
}
define i64 @test10(i64 %x) {
; CHECK-LABEL: test10:
; CHECK: # %bb.0:
; CHECK-NEXT: sldi 4, 3, 34
; CHECK-NEXT: sldi 3, 3, 30
; CHECK-NEXT: sub 3, 4, 3
; CHECK-NEXT: blr
%y = mul i64 %x, 17179860992
%z = mul i64 %x, 1073733632
%res = sub i64 %y, %z
ret i64 %res
}
define i32 @test11(i32 %x) {
; CHECK-LABEL: test11:
; CHECK: # %bb.0:
; CHECK-NEXT: mulli 3, 3, 21845
; CHECK-NEXT: slwi 3, 3, 5
; CHECK-NEXT: blr
%y = mul nsw i32 %x, 699040
ret i32 %y
}