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
77 lines
3.2 KiB
LLVM
77 lines
3.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s
|
|
; Tests that we don't crash upon encountering a vector GEP
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
%Dual = type { %Dual.72, %Partials.73 }
|
|
%Dual.72 = type { double, %Partials }
|
|
%Partials = type { [2 x double] }
|
|
%Partials.73 = type { [2 x %Dual.72] }
|
|
|
|
define <8 x ptr> @test_vector_gep(ptr %arg1, <8 x i64> %arg2) {
|
|
; CHECK-LABEL: define <8 x ptr> @test_vector_gep(
|
|
; CHECK-SAME: ptr [[ARG1:%.*]], <8 x i64> [[ARG2:%.*]]) {
|
|
; CHECK-NEXT: [[TOP:.*:]]
|
|
; CHECK-NEXT: [[VECTORGEP14_SPLIT:%.*]] = getelementptr inbounds [72 x i8], ptr [[ARG1]], <8 x i64> [[ARG2]]
|
|
; CHECK-NEXT: [[VECTORGEP14:%.*]] = getelementptr inbounds i8, <8 x ptr> [[VECTORGEP14_SPLIT]], i64 32
|
|
; CHECK-NEXT: ret <8 x ptr> [[VECTORGEP14]]
|
|
;
|
|
top:
|
|
%VectorGep14 = getelementptr inbounds %Dual, ptr %arg1, <8 x i64> %arg2, i32 1, i32 0, i64 0, i32 1, i32 0, i64 0
|
|
%0 = bitcast <8 x ptr> %VectorGep14 to <8 x ptr>
|
|
ret <8 x ptr> %0
|
|
}
|
|
|
|
%struct.A = type { i32, ptr }
|
|
%struct.B = type { i64, ptr }
|
|
%struct.C = type { i64 }
|
|
|
|
@G = internal global [65 x %struct.A] zeroinitializer, align 16
|
|
define <16 x ptr> @test() {
|
|
; CHECK-LABEL: define <16 x ptr> @test() {
|
|
; CHECK-NEXT: [[VECTOR_BODY:.*:]]
|
|
; CHECK-NEXT: ret <16 x ptr> getelementptr ([65 x [[STRUCT_A:%.*]]], ptr @G, <16 x i64> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>, i32 0)
|
|
;
|
|
vector.body:
|
|
%VectorGep = getelementptr [65 x %struct.A], ptr @G, <16 x i64> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>, <16 x i32> zeroinitializer
|
|
ret <16 x ptr> %VectorGep
|
|
}
|
|
|
|
define <16 x ptr> @test2() {
|
|
; CHECK-LABEL: define <16 x ptr> @test2() {
|
|
; CHECK-NEXT: [[VECTOR_BODY:.*:]]
|
|
; CHECK-NEXT: ret <16 x ptr> getelementptr ([65 x [[STRUCT_A:%.*]]], ptr @G, <16 x i64> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>, i32 0)
|
|
;
|
|
vector.body:
|
|
%VectorGep = getelementptr [65 x %struct.A], ptr @G, <16 x i32> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>, <16 x i32> zeroinitializer
|
|
ret <16 x ptr> %VectorGep
|
|
}
|
|
|
|
@g = external global i8, align 1
|
|
|
|
define <2 x ptr> @constant_zero_index() {
|
|
; CHECK-LABEL: define <2 x ptr> @constant_zero_index() {
|
|
; CHECK-NEXT: ret <2 x ptr> <ptr @g, ptr @g>
|
|
;
|
|
%gep = getelementptr i8, ptr @g, <2 x i64> zeroinitializer
|
|
ret <2 x ptr> %gep
|
|
}
|
|
|
|
define <2 x ptr> @constant_undef_index() {
|
|
; CHECK-LABEL: define <2 x ptr> @constant_undef_index() {
|
|
; CHECK-NEXT: ret <2 x ptr> <ptr @g, ptr @g>
|
|
;
|
|
%gep = getelementptr i8, ptr @g, <2 x i64> undef
|
|
ret <2 x ptr> %gep
|
|
}
|
|
|
|
define <2 x ptr> @constant_inbounds() {
|
|
; CHECK-LABEL: define <2 x ptr> @constant_inbounds() {
|
|
; CHECK-NEXT: ret <2 x ptr> getelementptr (i8, ptr @g, <2 x i64> splat (i64 1))
|
|
;
|
|
%gep = getelementptr i8, ptr @g, <2 x i64> <i64 1, i64 1>
|
|
ret <2 x ptr> %gep
|
|
}
|