Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/speculation-hardening-sls.mir
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

151 lines
4.5 KiB
YAML

# RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu \
# RUN: -start-before aarch64-sls-hardening -o - %s \
# RUN: -mattr=+pauth,+harden-sls-retbr \
# RUN: | FileCheck %s --check-prefixes=CHECK,ISBDSB
# RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu \
# RUN: -start-before aarch64-sls-hardening -o - %s \
# RUN: -mattr=+pauth,+harden-sls-retbr -mattr=+sb \
# RUN: | FileCheck %s --check-prefixes=CHECK,SB
# Check that the SLS hardening pass also protects BRA* indirect branches that
# llvm currently does not generate.
--- |
@ptr_aa = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@br_aa, %return), ptr blockaddress(@br_aa, %l2)], align 8
@ptr_aaz = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@br_aaz, %return), ptr blockaddress(@br_aaz, %l2)], align 8
@ptr_ab = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@br_ab, %return), ptr blockaddress(@br_ab, %l2)], align 8
@ptr_abz = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@br_abz, %return), ptr blockaddress(@br_abz, %l2)], align 8
define dso_local i32 @br_aa(i32 %a, i32 %b, i32 %i) {
entry:
br label %l2
l2:
br label %return
return:
ret i32 undef
}
define dso_local i32 @br_aaz(i32 %a, i32 %b, i32 %i) {
entry:
br label %l2
l2:
br label %return
return:
ret i32 undef
}
define dso_local i32 @br_ab(i32 %a, i32 %b, i32 %i) {
entry:
br label %l2
l2:
br label %return
return:
ret i32 undef
}
define dso_local i32 @br_abz(i32 %a, i32 %b, i32 %i) {
entry:
br label %l2
l2:
br label %return
return:
ret i32 undef
}
...
---
name: br_aa
tracksRegLiveness: true
body: |
; CHECK-LABEL: br_aa:
bb.0.entry:
successors: %bb.2, %bb.1
liveins: $w2
$x8 = ADRP target-flags(aarch64-page) @ptr_aa
renamable $x8 = ADDXri $x8, target-flags(aarch64-pageoff, aarch64-nc) @ptr_aa, 0
renamable $x8 = LDRXroW killed renamable $x8, killed renamable $w2, 1, 1
BRAA killed renamable $x8, $sp
; CHECK: braa x8, sp
; ISBDSB-NEXT: dsb sy
; ISBDSB-NEXT: isb
; SB-NEXT: {{ sb$}}
bb.1.l2 (ir-block-address-taken %ir-block.l2):
renamable $w0 = MOVZWi 1, 0
RET undef $lr, implicit $w0
bb.2.return (ir-block-address-taken %ir-block.return):
$w0 = ORRWrs $wzr, $wzr, 0
RET undef $lr, implicit $w0
...
---
name: br_aaz
tracksRegLiveness: true
body: |
; CHECK-LABEL: br_aaz:
bb.0.entry:
successors: %bb.2, %bb.1
liveins: $w2
$x8 = ADRP target-flags(aarch64-page) @ptr_aaz
renamable $x8 = ADDXri $x8, target-flags(aarch64-pageoff, aarch64-nc) @ptr_aaz, 0
renamable $x8 = LDRXroW killed renamable $x8, killed renamable $w2, 1, 1
BRAAZ killed renamable $x8
; CHECK: braaz x8
; ISBDSB-NEXT: dsb sy
; ISBDSB-NEXT: isb
; SB-NEXT: {{ sb$}}
bb.1.l2 (ir-block-address-taken %ir-block.l2):
renamable $w0 = MOVZWi 1, 0
RET undef $lr, implicit $w0
bb.2.return (ir-block-address-taken %ir-block.return):
$w0 = ORRWrs $wzr, $wzr, 0
RET undef $lr, implicit $w0
...
---
name: br_ab
tracksRegLiveness: true
body: |
; CHECK-LABEL: br_ab:
bb.0.entry:
successors: %bb.2, %bb.1
liveins: $w2
$x8 = ADRP target-flags(aarch64-page) @ptr_ab
renamable $x8 = ADDXri $x8, target-flags(aarch64-pageoff, aarch64-nc) @ptr_ab, 0
renamable $x8 = LDRXroW killed renamable $x8, killed renamable $w2, 1, 1
BRAA killed renamable $x8, $sp
; CHECK: braa x8, sp
; ISBDSB-NEXT: dsb sy
; ISBDSB-NEXT: isb
; SB-NEXT: {{ sb$}}
bb.1.l2 (ir-block-address-taken %ir-block.l2):
renamable $w0 = MOVZWi 1, 0
RET undef $lr, implicit $w0
bb.2.return (ir-block-address-taken %ir-block.return):
$w0 = ORRWrs $wzr, $wzr, 0
RET undef $lr, implicit $w0
...
---
name: br_abz
tracksRegLiveness: true
body: |
; CHECK-LABEL: br_abz:
bb.0.entry:
successors: %bb.2, %bb.1
liveins: $w2
$x8 = ADRP target-flags(aarch64-page) @ptr_abz
renamable $x8 = ADDXri $x8, target-flags(aarch64-pageoff, aarch64-nc) @ptr_abz, 0
renamable $x8 = LDRXroW killed renamable $x8, killed renamable $w2, 1, 1
BRAAZ killed renamable $x8
; CHECK: braaz x8
; ISBDSB-NEXT: dsb sy
; ISBDSB-NEXT: isb
; SB-NEXT: {{ sb$}}
bb.1.l2 (ir-block-address-taken %ir-block.l2):
renamable $w0 = MOVZWi 1, 0
RET undef $lr, implicit $w0
bb.2.return (ir-block-address-taken %ir-block.return):
$w0 = ORRWrs $wzr, $wzr, 0
RET undef $lr, implicit $w0
...