-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GlobalIsel][AArch64] fix out of range access in regbankselect (#92072)
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 | ||
; RUN: llc -mtriple=aarch64 -O0 -global-isel %s -o - 2>&1 | FileCheck %s | ||
|
||
target triple = "arm64" | ||
|
||
@p = external global { {}, { ptr } } | ||
|
||
define void @foo() { | ||
; CHECK-LABEL: foo: | ||
; CHECK: // %bb.0: // %bb | ||
; CHECK-NEXT: adrp x8, :got:p | ||
; CHECK-NEXT: ldr x8, [x8, :got_lo12:p] | ||
; CHECK-NEXT: ldr x8, [x8] | ||
; CHECK-NEXT: mov x9, xzr | ||
; CHECK-NEXT: str x8, [x9] | ||
; CHECK-NEXT: ret | ||
bb: | ||
%i1 = load ptr, ptr @p, align 8 | ||
store ptr %i1, ptr null, align 8 | ||
ret void | ||
} |