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
127 lines
4.1 KiB
LLVM
127 lines
4.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=instcombine -S < %s | FileCheck %s
|
|
target datalayout = "E-p:64:64:64-p1:64:64:64-p2:32:32:32-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
|
|
|
|
@x = external global <2 x i64>, align 16
|
|
@xx = external global [13 x <2 x i64>], align 16
|
|
|
|
@x.as2 = external addrspace(2) global <2 x i64>, align 16
|
|
|
|
define <2 x i64> @static_hem() {
|
|
; CHECK-LABEL: @static_hem(
|
|
; CHECK-NEXT: [[L:%.*]] = load <2 x i64>, ptr getelementptr (i8, ptr @x, i64 112), align 1
|
|
; CHECK-NEXT: ret <2 x i64> [[L]]
|
|
;
|
|
%t = getelementptr <2 x i64>, ptr @x, i32 7
|
|
%l = load <2 x i64>, ptr %t, align 1
|
|
ret <2 x i64> %l
|
|
}
|
|
|
|
define <2 x i64> @hem(i32 %i) {
|
|
; CHECK-LABEL: @hem(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[I:%.*]] to i64
|
|
; CHECK-NEXT: [[T:%.*]] = getelementptr [16 x i8], ptr @x, i64 [[TMP1]]
|
|
; CHECK-NEXT: [[L:%.*]] = load <2 x i64>, ptr [[T]], align 1
|
|
; CHECK-NEXT: ret <2 x i64> [[L]]
|
|
;
|
|
%t = getelementptr <2 x i64>, ptr @x, i32 %i
|
|
%l = load <2 x i64>, ptr %t, align 1
|
|
ret <2 x i64> %l
|
|
}
|
|
|
|
define <2 x i64> @hem_2d(i32 %i, i32 %j) {
|
|
; CHECK-LABEL: @hem_2d(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[I:%.*]] to i64
|
|
; CHECK-NEXT: [[TMP2:%.*]] = sext i32 [[J:%.*]] to i64
|
|
; CHECK-NEXT: [[T_SPLIT:%.*]] = getelementptr [208 x i8], ptr @xx, i64 [[TMP1]]
|
|
; CHECK-NEXT: [[T:%.*]] = getelementptr [16 x i8], ptr [[T_SPLIT]], i64 [[TMP2]]
|
|
; CHECK-NEXT: [[L:%.*]] = load <2 x i64>, ptr [[T]], align 1
|
|
; CHECK-NEXT: ret <2 x i64> [[L]]
|
|
;
|
|
%t = getelementptr [13 x <2 x i64>], ptr @xx, i32 %i, i32 %j
|
|
%l = load <2 x i64>, ptr %t, align 1
|
|
ret <2 x i64> %l
|
|
}
|
|
|
|
define <2 x i64> @foo() {
|
|
; CHECK-LABEL: @foo(
|
|
; CHECK-NEXT: [[L:%.*]] = load <2 x i64>, ptr @x, align 1
|
|
; CHECK-NEXT: ret <2 x i64> [[L]]
|
|
;
|
|
%l = load <2 x i64>, ptr @x, align 1
|
|
ret <2 x i64> %l
|
|
}
|
|
|
|
define <2 x i64> @bar() {
|
|
; CHECK-LABEL: @bar(
|
|
; CHECK-NEXT: [[T:%.*]] = alloca <2 x i64>, align 16
|
|
; CHECK-NEXT: call void @kip(ptr nonnull [[T]])
|
|
; CHECK-NEXT: [[L:%.*]] = load <2 x i64>, ptr [[T]], align 1
|
|
; CHECK-NEXT: ret <2 x i64> [[L]]
|
|
;
|
|
%t = alloca <2 x i64>
|
|
call void @kip(ptr %t)
|
|
%l = load <2 x i64>, ptr %t, align 1
|
|
ret <2 x i64> %l
|
|
}
|
|
|
|
define void @static_hem_store(<2 x i64> %y) {
|
|
; CHECK-LABEL: @static_hem_store(
|
|
; CHECK-NEXT: store <2 x i64> [[Y:%.*]], ptr getelementptr (i8, ptr @x, i64 112), align 1
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%t = getelementptr <2 x i64>, ptr @x, i32 7
|
|
store <2 x i64> %y, ptr %t, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @hem_store(i32 %i, <2 x i64> %y) {
|
|
; CHECK-LABEL: @hem_store(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[I:%.*]] to i64
|
|
; CHECK-NEXT: [[T:%.*]] = getelementptr [16 x i8], ptr @x, i64 [[TMP1]]
|
|
; CHECK-NEXT: store <2 x i64> [[Y:%.*]], ptr [[T]], align 1
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%t = getelementptr <2 x i64>, ptr @x, i32 %i
|
|
store <2 x i64> %y, ptr %t, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @hem_2d_store(i32 %i, i32 %j, <2 x i64> %y) {
|
|
; CHECK-LABEL: @hem_2d_store(
|
|
; CHECK-NEXT: [[TMP1:%.*]] = sext i32 [[I:%.*]] to i64
|
|
; CHECK-NEXT: [[TMP2:%.*]] = sext i32 [[J:%.*]] to i64
|
|
; CHECK-NEXT: [[T_SPLIT:%.*]] = getelementptr [208 x i8], ptr @xx, i64 [[TMP1]]
|
|
; CHECK-NEXT: [[T:%.*]] = getelementptr [16 x i8], ptr [[T_SPLIT]], i64 [[TMP2]]
|
|
; CHECK-NEXT: store <2 x i64> [[Y:%.*]], ptr [[T]], align 1
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%t = getelementptr [13 x <2 x i64>], ptr @xx, i32 %i, i32 %j
|
|
store <2 x i64> %y, ptr %t, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @foo_store(<2 x i64> %y) {
|
|
; CHECK-LABEL: @foo_store(
|
|
; CHECK-NEXT: store <2 x i64> [[Y:%.*]], ptr @x, align 1
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
store <2 x i64> %y, ptr @x, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @bar_store(<2 x i64> %y) {
|
|
; CHECK-LABEL: @bar_store(
|
|
; CHECK-NEXT: [[T:%.*]] = alloca <2 x i64>, align 16
|
|
; CHECK-NEXT: call void @kip(ptr nonnull [[T]])
|
|
; CHECK-NEXT: store <2 x i64> [[Y:%.*]], ptr [[T]], align 1
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%t = alloca <2 x i64>
|
|
call void @kip(ptr %t)
|
|
store <2 x i64> %y, ptr %t, align 1
|
|
ret void
|
|
}
|
|
|
|
declare void @kip(ptr %t)
|