File: remark-masked-loads-consecutive-loads-same-ptr.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (58 lines) | stat: -rw-r--r-- 2,703 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake-avx512 -pass-remarks-output=%t | FileCheck %s
; RUN: FileCheck --input-file=%t --check-prefix=YAML %s

; YAML-LABEL: --- !Passed
; YAML-NEXT:  Pass:            slp-vectorizer
; YAML-NEXT:  Name:            StoresVectorized
; YAML-NEXT:  Function:        test
; YAML-NEXT:  Args:
; YAML-NEXT:    - String:          'Stores SLP vectorized with cost '
; YAML-NEXT:    - Cost:            '-7'
; YAML-NEXT:    - String:          ' and with tree size '
; YAML-NEXT:    - TreeSize:        '5'

define void @test(ptr noalias %p, ptr noalias %p1) {
; CHECK-LABEL: @test(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[I:%.*]] = load i32, ptr [[P:%.*]], align 4
; CHECK-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr i32, ptr [[P]], i64 32
; CHECK-NEXT:    [[I2:%.*]] = load i32, ptr [[ARRAYIDX4]], align 4
; CHECK-NEXT:    [[ARRAYIDX11:%.*]] = getelementptr i32, ptr [[P]], i64 33
; CHECK-NEXT:    [[TMP0:%.*]] = load <2 x i32>, ptr [[ARRAYIDX11]], align 4
; CHECK-NEXT:    [[TMP1:%.*]] = load <4 x i32>, ptr [[P]], align 4
; CHECK-NEXT:    [[TMP2:%.*]] = insertelement <4 x i32> poison, i32 [[I]], i32 0
; CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i32> [[TMP2]], i32 [[I2]], i32 1
; CHECK-NEXT:    [[TMP4:%.*]] = call <4 x i32> @llvm.vector.insert.v4i32.v2i32(<4 x i32> [[TMP3]], <2 x i32> [[TMP0]], i64 2)
; CHECK-NEXT:    [[TMP5:%.*]] = add nsw <4 x i32> [[TMP4]], [[TMP1]]
; CHECK-NEXT:    store <4 x i32> [[TMP5]], ptr [[P1:%.*]], align 4
; CHECK-NEXT:    ret void
;
entry:
  %i = load i32, ptr %p, align 4
  %i1 = load i32, ptr %p, align 4
  %add = add nsw i32 %i, %i1
  store i32 %add, ptr %p1, align 4
  %arrayidx4 = getelementptr i32, ptr %p, i64 32
  %i2 = load i32, ptr %arrayidx4, align 4
  %arrayidx6 = getelementptr i32, ptr %p, i64 1
  %i3 = load i32, ptr %arrayidx6, align 4
  %add7 = add nsw i32 %i2, %i3
  %arrayidx9 = getelementptr i32, ptr %p1, i64 1
  store i32 %add7, ptr %arrayidx9, align 4
  %arrayidx11 = getelementptr i32, ptr %p, i64 33
  %i4 = load i32, ptr %arrayidx11, align 4
  %arrayidx13 = getelementptr i32, ptr %p, i64 2
  %i5 = load i32, ptr %arrayidx13, align 4
  %add14 = add nsw i32 %i4, %i5
  %arrayidx16 = getelementptr i32, ptr %p1, i64 2
  store i32 %add14, ptr %arrayidx16, align 4
  %arrayidx18 = getelementptr i32, ptr %p, i64 34
  %i6 = load i32, ptr %arrayidx18, align 4
  %arrayidx19 = getelementptr i32, ptr %p, i64 3
  %i7 = load i32, ptr %arrayidx19, align 4
  %add21 = add nsw i32 %i6, %i7
  %arrayidx23 = getelementptr i32, ptr %p1, i64 3
  store i32 %add21, ptr %arrayidx23, align 4
  ret void
}