[clang] [llvm] [AArch64] Add support for range prefetch intrinsic (PR #170490)

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 16 07:43:59 PST 2025


================
@@ -0,0 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=aarch64 -mattr=+v8.9a --global-isel=0 < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64 -mattr=+v8.9a --global-isel=1 --global-isel-abort=1 < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64 -mattr=+v8.9a -mattr=+rprfm --global-isel=0 < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64 -mattr=+v8.9a -mattr=+rprfm --global-isel=1 --global-isel-abort=1 < %s | FileCheck %s
+
+define void @test(ptr %a, ptr %b) {
+; CHECK-LABEL: test:
+; CHECK:      mov   x8, #-562675075514369
+; CHECK-NEXT: mov   x9, #4192256
+; CHECK-NEXT: movk  x8, #2040
+; CHECK-NEXT: orr   x9, x9, #0x1fe0000000000
+; CHECK-NEXT: movk  x8, #65472, lsl #16
----------------
kmclaughlin-arm wrote:

As I understand it, these instructions are moving values representing all metadata into `x8` & `x9`, not the individual values for stride, count, length & distance. There are only two values being calculated because two of the intrinsics in this test are using identical values to the others.

I've rewritten this test a bit to try and make it easier to check that the correct values are being created, especially for the reuse distance.

https://github.com/llvm/llvm-project/pull/170490


More information about the cfe-commits mailing list