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
107 lines
2.2 KiB
LLVM
107 lines
2.2 KiB
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - -O1 -debug-only=consthoist 2>&1 | FileCheck %s
|
|
; REQUIRES: asserts
|
|
|
|
declare void @g(i64)
|
|
|
|
; Single ORR.
|
|
; CHECK: Function: f1
|
|
; CHECK-NOT: Collect constant
|
|
define void @f1(i1 %cond) {
|
|
entry:
|
|
call void @g(i64 -3)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
call void @g(i64 -3)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|
|
|
|
; Constant is 0xBEEF000000000000, single MOVZ with shift.
|
|
; CHECK: Function: f2
|
|
; CHECK-NOT: Collect constant
|
|
define void @f2(i1 %cond, i64 %p, i64 %q) {
|
|
entry:
|
|
%a = and i64 %p, 13758215386640154624
|
|
call void @g(i64 %a)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
%b = and i64 %q, 13758215386640154624
|
|
call void @g(i64 %b)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Function: f3
|
|
; CHECK: Collect constant i64 4294967103 from %a = and i64 %p, 4294967103 with cost 2
|
|
define void @f3(i1 %cond, i64 %p, i64 %q) {
|
|
entry:
|
|
%a = and i64 %p, 4294967103
|
|
call void @g(i64 %a)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
%b = and i64 %q, 4294967103
|
|
call void @g(i64 %b)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Function: f4
|
|
; Collect constant i64 -4688528683866062848 from %a = and i64 %p, -4688528683866062848 with cost 2
|
|
define void @f4(i1 %cond, i64 %p, i64 %q) {
|
|
entry:
|
|
%a = and i64 %p, 13758215389843488768
|
|
call void @g(i64 %a)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
%b = and i64 %q, 13758215389843488768
|
|
call void @g(i64 %b)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Function: f5
|
|
; Collect constant i64 88994925642865 from %a = and i64 %p, 88994925642865 with cost 3
|
|
define void @f5(i1 %cond, i64 %p, i64 %q) {
|
|
entry:
|
|
%a = and i64 %p, 88994925642865
|
|
call void @g(i64 %a)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
%b = and i64 %q, 88994925642865
|
|
call void @g(i64 %b)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Function: f6
|
|
; Collect constant i64 -4688439692143754127 from %b = and i64 %q, -4688439692143754127 with cost 4
|
|
define void @f6(i1 %cond, i64 %p, i64 %q) {
|
|
entry:
|
|
%a = and i64 %p, 13758304381565797489
|
|
call void @g(i64 %a)
|
|
br i1 %cond, label %true, label %ret
|
|
|
|
true:
|
|
%b = and i64 %q, 13758304381565797489
|
|
call void @g(i64 %b)
|
|
br label %ret
|
|
|
|
ret:
|
|
ret void
|
|
}
|