Files
TheRock/compiler/amd-llvm/llvm/test/Feature/vector-cast-constant-exprs.ll
T
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

66 lines
2.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
; RUN: opt -S -passes=instsimplify < %s | FileCheck %s
; All of these constant expressions should fold.
define <2 x float> @ga() {
; CHECK-LABEL: define <2 x float> @ga() {
; CHECK-NEXT: ret <2 x float> <float 4.300000e+00, float 3.200000e+00>
;
%fptrunc = fptrunc <2 x double> <double 4.3, double 3.2> to <2 x float>
ret <2 x float> %fptrunc
}
define <2 x double> @gb() {
; CHECK-LABEL: define <2 x double> @gb() {
; CHECK-NEXT: ret <2 x double> <double 2.000000e+00, double 8.000000e+00>
;
%fpext = fpext <2 x float><float 2.0, float 8.0> to <2 x double>
ret <2 x double> %fpext
}
define <2 x i32> @gf() {
; CHECK-LABEL: define <2 x i32> @gf() {
; CHECK-NEXT: ret <2 x i32> <i32 3, i32 4>
;
ret <2 x i32> trunc (<2 x i64><i64 3, i64 4> to <2 x i32>)
}
define <2 x i32> @gh() {
; CHECK-LABEL: define <2 x i32> @gh() {
; CHECK-NEXT: ret <2 x i32> <i32 8, i32 7>
;
%fptoui = fptoui <2 x float><float 8.0, float 7.0> to <2 x i32>
ret <2 x i32> %fptoui
}
define <2 x i32> @gi() {
; CHECK-LABEL: define <2 x i32> @gi() {
; CHECK-NEXT: ret <2 x i32> <i32 8, i32 7>
;
%fptosi = fptosi <2 x float><float 8.0, float 7.0> to <2 x i32>
ret <2 x i32> %fptosi
}
define <2 x float> @gj() {
; CHECK-LABEL: define <2 x float> @gj() {
; CHECK-NEXT: ret <2 x float> <float 8.000000e+00, float 7.000000e+00>
;
%uitofp = uitofp <2 x i32><i32 8, i32 7> to <2 x float>
ret <2 x float> %uitofp
}
define <2 x float> @gk() {
; CHECK-LABEL: define <2 x float> @gk() {
; CHECK-NEXT: ret <2 x float> <float 8.000000e+00, float 7.000000e+00>
;
%sitofp = sitofp <2 x i32><i32 8, i32 7> to <2 x float>
ret <2 x float> %sitofp
}
define <2 x double> @gl() {
; CHECK-LABEL: define <2 x double> @gl() {
; CHECK-NEXT: ret <2 x double> <double 4.000000e+00, double 3.000000e+00>
;
ret <2 x double> bitcast (<2 x double><double 4.0, double 3.0> to <2 x double>)
}
define <2 x double> @gm() {
; CHECK-LABEL: define <2 x double> @gm() {
; CHECK-NEXT: ret <2 x double> <double 1.976260e-323, double 1.482200e-323>
;
ret <2 x double> bitcast (<2 x i64><i64 4, i64 3> to <2 x double>)
}