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
94 lines
2.3 KiB
LLVM
94 lines
2.3 KiB
LLVM
; RUN: llc < %s -asm-verbose=false \
|
|
; RUN: -fast-isel -fast-isel-abort=3 -verify-machineinstrs \
|
|
; RUN: -wasm-disable-explicit-locals -wasm-keep-registers -O0 \
|
|
; RUN: | FileCheck %s
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
; This tests very minimal fast-isel functionality.
|
|
|
|
; CHECK-LABEL: immediate_f32:
|
|
; CHECK: f32.const $push{{[0-9]+}}=, 0x1.4p1{{$}}
|
|
define float @immediate_f32() {
|
|
ret float 2.5
|
|
}
|
|
|
|
; CHECK-LABEL: immediate_f64:
|
|
; CHECK: f64.const $push{{[0-9]+}}=, 0x1.4p1{{$}}
|
|
define double @immediate_f64() {
|
|
ret double 2.5
|
|
}
|
|
|
|
; CHECK-LABEL: bitcast_i32_f32:
|
|
; CHECK: i32.reinterpret_f32 $push{{[0-9]+}}=, $0{{$}}
|
|
define i32 @bitcast_i32_f32(float %x) {
|
|
%y = bitcast float %x to i32
|
|
ret i32 %y
|
|
}
|
|
|
|
; CHECK-LABEL: bitcast_f32_i32:
|
|
; CHECK: f32.reinterpret_i32 $push{{[0-9]+}}=, $0{{$}}
|
|
define float @bitcast_f32_i32(i32 %x) {
|
|
%y = bitcast i32 %x to float
|
|
ret float %y
|
|
}
|
|
|
|
; CHECK-LABEL: bitcast_i64_f64:
|
|
; CHECK: i64.reinterpret_f64 $push{{[0-9]+}}=, $0{{$}}
|
|
define i64 @bitcast_i64_f64(double %x) {
|
|
%y = bitcast double %x to i64
|
|
ret i64 %y
|
|
}
|
|
|
|
; CHECK-LABEL: bitcast_f64_i64:
|
|
; CHECK: f64.reinterpret_i64 $push{{[0-9]+}}=, $0{{$}}
|
|
define double @bitcast_f64_i64(i64 %x) {
|
|
%y = bitcast i64 %x to double
|
|
ret double %y
|
|
}
|
|
|
|
; Do fold offsets into geps.
|
|
; CHECK-LABEL: do_fold_offset_into_gep:
|
|
; CHECK: i64.load $push{{[0-9]+}}=, 8($0)
|
|
define i64 @do_fold_offset_into_gep(ptr %p) {
|
|
bb:
|
|
%tmp = getelementptr inbounds i64, ptr %p, i32 1
|
|
%tmp2 = load i64, ptr %tmp, align 8
|
|
ret i64 %tmp2
|
|
}
|
|
|
|
; Don't fold negative offsets into geps.
|
|
; CHECK-LABEL: dont_fold_negative_offset:
|
|
; CHECK: i64.load $push{{[0-9]+}}=, 0($pop{{[0-9]+}})
|
|
define i64 @dont_fold_negative_offset(ptr %p) {
|
|
bb:
|
|
%tmp = getelementptr inbounds i64, ptr %p, i32 -1
|
|
%tmp2 = load i64, ptr %tmp, align 8
|
|
ret i64 %tmp2
|
|
}
|
|
|
|
; Don't fold non-inbounds geps.
|
|
; CHECK-LABEL: dont_fold_non_inbounds_gep:
|
|
; CHECK: i64.load $push{{[0-9]+}}=, 0($pop{{[0-9]+}})
|
|
define i64 @dont_fold_non_inbounds_gep(ptr %p) {
|
|
bb:
|
|
%tmp = getelementptr i64, ptr %p, i32 1
|
|
%tmp2 = load i64, ptr %tmp, align 8
|
|
ret i64 %tmp2
|
|
}
|
|
|
|
; CHECK-LABEL: br:
|
|
; CHECK: br_if
|
|
; CHECK: br
|
|
; CHECK: f32.const $push{{[0-9]+}}=, 0x1.4p1{{$}}
|
|
define float @br(i32 %a) {
|
|
%cond = icmp eq i32 %a, 0
|
|
br i1 %cond, label %block1, label %block2
|
|
block1:
|
|
br label %block3
|
|
block2:
|
|
br label %block3
|
|
block3:
|
|
ret float 2.5
|
|
}
|