• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -O2 -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s
3; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t
4
5; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it.
6; WARN-NOT: warning: {{.*}}TypeSize is not scalable
7
8; #include <arm_sve.h>
9; #include <stdint.h>
10;
11; void redundant_store(uint32_t *p, svint32_t v) {
12;     *p = 1;
13;     *(svint32_t *)p = v;
14; }
15
16; Update me: Until dead store elimination is improved in DAGCombine, this will contain a redundant store.
17;
18define void @redundant_store(i32* nocapture %p, <vscale x 4 x i32> %v) {
19; CHECK-LABEL: redundant_store:
20; CHECK:       // %bb.0:
21; CHECK-NEXT:    mov w8, #1
22; CHECK-NEXT:    ptrue p0.s
23; CHECK-NEXT:    str w8, [x0]
24; CHECK-NEXT:    st1w { z0.s }, p0, [x0]
25; CHECK-NEXT:    ret
26  store i32 1, i32* %p, align 4
27  %1 = bitcast i32* %p to <vscale x 4 x i32>*
28  store <vscale x 4 x i32> %v, <vscale x 4 x i32>* %1, align 16
29  ret void
30}
31