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
81 lines
2.6 KiB
LLVM
81 lines
2.6 KiB
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu -enable-machine-outliner < %s | FileCheck %s --check-prefix=BTI
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -global-isel -enable-machine-outliner < %s | \
|
|
; RUN: FileCheck %s --check-prefix=BTI
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -fast-isel -enable-machine-outliner < %s | \
|
|
; RUN: FileCheck %s --check-prefix=BTI
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -enable-machine-outliner -mattr=+no-bti-at-return-twice < %s | \
|
|
; RUN: FileCheck %s --check-prefix=NOBTI
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -global-isel -enable-machine-outliner -mattr=+no-bti-at-return-twice < %s | \
|
|
; RUN: FileCheck %s --check-prefix=NOBTI
|
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -fast-isel -enable-machine-outliner -mattr=+no-bti-at-return-twice < %s | \
|
|
; RUN: FileCheck %s --check-prefix=NOBTI
|
|
|
|
; Check that the outliner does not split up the call to setjmp and the bti after it.
|
|
; When we do not insert a bti, it is allowed to move the setjmp call into an outlined function.
|
|
|
|
; C source
|
|
; --------
|
|
; extern int setjmp(ptr);
|
|
;
|
|
; int f(int a, int b, int c, int d) {
|
|
; setjmp(0);
|
|
; return 1 + a * (a + b) / (c + d);
|
|
; }
|
|
;
|
|
; int g(int a, int b, int c, int d) {
|
|
; setjmp(0);
|
|
; return 2 + a * (a + b) / (c + d);
|
|
; }
|
|
|
|
define i32 @f(i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %d) #0 {
|
|
; BTI-LABEL: f:
|
|
; BTI: bl OUTLINED_FUNCTION_1
|
|
; BTI-NEXT: bl setjmp
|
|
; BTI-NEXT: hint #36
|
|
; BTI-NEXT: bl OUTLINED_FUNCTION_0
|
|
|
|
; NOBTI: f:
|
|
; NOBTI: bl OUTLINED_FUNCTION_0
|
|
; NOBTI-NEXT: bl OUTLINED_FUNCTION_1
|
|
|
|
entry:
|
|
%call = call i32 @setjmp(ptr noundef null) #1
|
|
%add = add nsw i32 %b, %a
|
|
%mul = mul nsw i32 %add, %a
|
|
%add1 = add nsw i32 %d, %c
|
|
%div = sdiv i32 %mul, %add1
|
|
%add2 = add nsw i32 %div, 1
|
|
ret i32 %add2
|
|
}
|
|
|
|
declare i32 @setjmp(ptr noundef) #0
|
|
|
|
define i32 @g(i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %d) #0 {
|
|
; BTI-LABEL: g:
|
|
; BTI: bl OUTLINED_FUNCTION_1
|
|
; BTI-NEXT: bl setjmp
|
|
; BTI-NEXT: hint #36
|
|
; BTI-NEXT: bl OUTLINED_FUNCTION_0
|
|
|
|
; NOBTI: g:
|
|
; NOBTI: bl OUTLINED_FUNCTION_0
|
|
; NOBTI-NEXT: bl OUTLINED_FUNCTION_1
|
|
|
|
entry:
|
|
%call = call i32 @setjmp(ptr noundef null) #1
|
|
%add = add nsw i32 %b, %a
|
|
%mul = mul nsw i32 %add, %a
|
|
%add1 = add nsw i32 %d, %c
|
|
%div = sdiv i32 %mul, %add1
|
|
%add2 = add nsw i32 %div, 2
|
|
ret i32 %add2
|
|
}
|
|
|
|
; NOBTI-LABEL: OUTLINED_FUNCTION_0:
|
|
; NOBTI: b setjmp
|
|
; NOBTI: OUTLINED_FUNCTION_1:
|
|
; NOBTI-LABEL: ret
|
|
|
|
attributes #0 = { "branch-target-enforcement" }
|
|
attributes #1 = { returns_twice }
|