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
70 lines
2.1 KiB
LLVM
70 lines
2.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
|
|
; Test that constant structs are folded.
|
|
; RUN: opt %s -passes=sccp -S | FileCheck %s
|
|
|
|
define internal {i64} @struct1() {
|
|
; CHECK-LABEL: define internal { i64 } @struct1() {
|
|
; CHECK-NEXT: ret { i64 } { i64 24 }
|
|
;
|
|
%a = insertvalue {i64} undef, i64 24, 0
|
|
ret {i64} %a
|
|
}
|
|
|
|
define internal {i64, i64} @struct2() {
|
|
; CHECK-LABEL: define internal { i64, i64 } @struct2() {
|
|
; CHECK-NEXT: ret { i64, i64 } { i64 24, i64 undef }
|
|
;
|
|
%a = insertvalue {i64, i64} undef, i64 24, 0
|
|
ret {i64, i64} %a
|
|
}
|
|
|
|
define internal {i64, i64, i64} @struct3(i64 %x) {
|
|
; CHECK-LABEL: define internal { i64, i64, i64 } @struct3
|
|
; CHECK-SAME: (i64 [[X:%.*]]) {
|
|
; CHECK-NEXT: [[C:%.*]] = insertvalue { i64, i64, i64 } { i64 24, i64 36, i64 undef }, i64 [[X]], 2
|
|
; CHECK-NEXT: ret { i64, i64, i64 } [[C]]
|
|
;
|
|
%a = insertvalue {i64, i64, i64} undef, i64 24, 0
|
|
%b = insertvalue {i64, i64, i64} %a, i64 36, 1
|
|
%c = insertvalue {i64, i64, i64} %b, i64 %x, 2
|
|
ret {i64, i64, i64} %c
|
|
}
|
|
|
|
; Test(s) for overdefined values.
|
|
define internal {i64, i32} @struct4(i32 %x) {
|
|
; CHECK-LABEL: define internal { i64, i32 } @struct4
|
|
; CHECK-SAME: (i32 [[X:%.*]]) {
|
|
; CHECK-NEXT: [[A:%.*]] = insertvalue { i64, i32 } { i64 12, i32 24 }, i32 [[X]], 1
|
|
; CHECK-NEXT: ret { i64, i32 } [[A]]
|
|
;
|
|
%a = insertvalue {i64, i32} {i64 12, i32 24}, i32 %x, 1
|
|
ret {i64, i32} %a
|
|
}
|
|
|
|
define internal {i32} @struct5(i32 %x) {
|
|
; CHECK-LABEL: define internal { i32 } @struct5
|
|
; CHECK-SAME: (i32 [[X:%.*]]) {
|
|
; CHECK-NEXT: [[A:%.*]] = insertvalue { i32 } undef, i32 [[X]], 0
|
|
; CHECK-NEXT: ret { i32 } [[A]]
|
|
;
|
|
%a = insertvalue {i32} undef, i32 %x, 0
|
|
ret {i32} %a
|
|
}
|
|
|
|
define internal {i32} @struct6({i32} %x) {
|
|
; CHECK-LABEL: define internal { i32 } @struct6
|
|
; CHECK-SAME: ({ i32 } [[X:%.*]]) {
|
|
; CHECK-NEXT: ret { i32 } { i32 12 }
|
|
;
|
|
%a = insertvalue {i32} %x, i32 12, 0
|
|
ret {i32} %a
|
|
}
|
|
|
|
define internal {i16} @struct7() {
|
|
; CHECK-LABEL: define internal { i16 } @struct7() {
|
|
; CHECK-NEXT: ret { i16 } { i16 7 }
|
|
;
|
|
%a = insertvalue {i16} {i16 4}, i16 7, 0
|
|
ret {i16} %a
|
|
}
|