[llvm] [GlobalISel] Turn shuffle a, b, mask -> shuffle undef, b, mask iff mask does not reference a (PR #115377)

Konstantin Schwarz via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 15:06:38 PST 2024


================
@@ -1,35 +1,50 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
-; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s --check-prefixes=CHECK,CHECK-SD
-; RUN: llc < %s -mtriple=arm64-eabi -global-isel=1 -aarch64-neon-syntax=apple | FileCheck %s --check-prefixes=CHECK,CHECK-GI
+; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-SD
+; RUN: llc < %s -mtriple=arm64-eabi -global-isel=1 -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-GI
 
 ; Extract of an upper half of a vector is an "ext.16b v0, v0, v0, #8" insn.
 
 define <8 x i8> @v8i8(<16 x i8> %a) nounwind {
-; CHECK-LABEL: v8i8:
-; CHECK:       // %bb.0:
-; CHECK-NEXT:    ext.16b v0, v0, v0, #8
-; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $q0
-; CHECK-NEXT:    ret
+; CHECK-SD-LABEL: v8i8:
+; CHECK-SD:       // %bb.0:
+; CHECK-SD-NEXT:    ext.16b v0, v0, v0, #8
+; CHECK-SD-NEXT:    // kill: def $d0 killed $d0 killed $q0
+; CHECK-SD-NEXT:    ret
+;
+; CHECK-GI-LABEL: v8i8:
+; CHECK-GI:       // %bb.0:
+; CHECK-GI-NEXT:    mov d0, v0[1]
----------------
konstantinschwarz wrote:

There are no common CHECK lines left, so FileCheck was complaining:
```
error: no check strings found with prefix 'CHECK:'
```


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


More information about the llvm-commits mailing list