[llvm] [test][PAC][AArch64] Add ELF tests for subtarget-neutral codegen (PR #98020)

Anton Korobeynikov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 15:14:44 PDT 2024


================
@@ -1,44 +1,58 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=0 | FileCheck %s
-; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s
+; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs \
+; RUN:   -global-isel=0 | FileCheck %s --check-prefixes=DARWIN,CHECK
+; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs \
+; RUN:   -global-isel=1 -global-isel-abort=1 | FileCheck %s --check-prefixes=DARWIN,CHECK
+; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs \
+; RUN:   -global-isel=0 | FileCheck %s --check-prefixes=ELF,CHECK
+; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs \
+; RUN:   -global-isel=1 -global-isel-abort=1 | FileCheck %s --check-prefixes=ELF,CHECK
 
 define i64 @test_blend(i64 %arg, i64 %arg1) {
-; CHECK-LABEL: test_blend:
-; CHECK:       ; %bb.0:
-; CHECK-NEXT:    bfi x0, x1, #48, #16
-; CHECK-NEXT:    ret
+; DARWIN-LABEL: _test_blend:
+; ELF-LABEL:    test_blend:
+; DARWIN:       ; %bb.0:
+; ELF:          // %bb.0:
+; CHECK-NEXT:     bfi x0, x1, #48, #16
+; CHECK-NEXT:     ret
   %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 %arg1)
   ret i64 %tmp
 }
 
 define i64 @test_blend_constant(i64 %arg) {
-; CHECK-LABEL: test_blend_constant:
-; CHECK:       ; %bb.0:
-; CHECK-NEXT:    movk x0, #12345, lsl #48
-; CHECK-NEXT:    ret
+; DARWIN-LABEL: _test_blend_constant:
----------------
asl wrote:

Do we really need to test the platform differences? Can we use `CHECK-LABEL: test_blend_constant` and `CHECK: %bb.0` on all platforms? Same in other files.

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


More information about the llvm-commits mailing list