File: stop_bndl.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (71 lines) | stat: -rw-r--r-- 4,307 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
59
60
61
62
63
64
65
66
67
68
69
70
71
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2 -sbvec-passes="seed-collection<tr-save,bottom-up-vec,tr-accept>" -sbvec-stop-bndl=0 %s -S | FileCheck %s --check-prefix=STOP0
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2 -sbvec-passes="seed-collection<tr-save,bottom-up-vec,tr-accept>" -sbvec-stop-bndl=1 %s -S | FileCheck %s --check-prefix=STOP1
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2 -sbvec-passes="seed-collection<tr-save,bottom-up-vec,tr-accept>" -sbvec-stop-bndl=2 %s -S | FileCheck %s --check-prefix=STOP2
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2 -sbvec-passes="seed-collection<tr-save,bottom-up-vec,tr-accept>" -sbvec-stop-bndl=3 %s -S | FileCheck %s --check-prefix=STOP3
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2 -sbvec-passes="seed-collection<tr-save,bottom-up-vec,tr-accept>"  %s -S | FileCheck %s --check-prefix=NOSTOP

define void @stop_bndl(ptr %ptr) {
; STOP0-LABEL: define void @stop_bndl(
; STOP0-SAME: ptr [[PTR:%.*]]) {
; STOP0-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; STOP0-NEXT:    [[PTR1:%.*]] = getelementptr float, ptr [[PTR]], i32 1
; STOP0-NEXT:    [[LD0:%.*]] = load float, ptr [[PTR0]], align 4
; STOP0-NEXT:    [[LD1:%.*]] = load float, ptr [[PTR1]], align 4
; STOP0-NEXT:    [[ADD0:%.*]] = fadd float [[LD0]], 0.000000e+00
; STOP0-NEXT:    [[ADD1:%.*]] = fadd float [[LD1]], 0.000000e+00
; STOP0-NEXT:    store float [[ADD0]], ptr [[PTR0]], align 4
; STOP0-NEXT:    store float [[ADD1]], ptr [[PTR1]], align 4
; STOP0-NEXT:    ret void
;
; STOP1-LABEL: define void @stop_bndl(
; STOP1-SAME: ptr [[PTR:%.*]]) {
; STOP1-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; STOP1-NEXT:    [[PTR1:%.*]] = getelementptr float, ptr [[PTR]], i32 1
; STOP1-NEXT:    [[LD0:%.*]] = load float, ptr [[PTR0]], align 4
; STOP1-NEXT:    [[LD1:%.*]] = load float, ptr [[PTR1]], align 4
; STOP1-NEXT:    [[ADD0:%.*]] = fadd float [[LD0]], 0.000000e+00
; STOP1-NEXT:    [[ADD1:%.*]] = fadd float [[LD1]], 0.000000e+00
; STOP1-NEXT:    [[PACK:%.*]] = insertelement <2 x float> poison, float [[ADD0]], i32 0
; STOP1-NEXT:    [[PACK1:%.*]] = insertelement <2 x float> [[PACK]], float [[ADD1]], i32 1
; STOP1-NEXT:    store <2 x float> [[PACK1]], ptr [[PTR0]], align 4
; STOP1-NEXT:    ret void
;
; STOP2-LABEL: define void @stop_bndl(
; STOP2-SAME: ptr [[PTR:%.*]]) {
; STOP2-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; STOP2-NEXT:    [[PTR1:%.*]] = getelementptr float, ptr [[PTR]], i32 1
; STOP2-NEXT:    [[LD0:%.*]] = load float, ptr [[PTR0]], align 4
; STOP2-NEXT:    [[LD1:%.*]] = load float, ptr [[PTR1]], align 4
; STOP2-NEXT:    [[PACK:%.*]] = insertelement <2 x float> poison, float [[LD0]], i32 0
; STOP2-NEXT:    [[PACK1:%.*]] = insertelement <2 x float> [[PACK]], float [[LD1]], i32 1
; STOP2-NEXT:    [[VEC:%.*]] = fadd <2 x float> [[PACK1]], zeroinitializer
; STOP2-NEXT:    store <2 x float> [[VEC]], ptr [[PTR0]], align 4
; STOP2-NEXT:    ret void
;
; STOP3-LABEL: define void @stop_bndl(
; STOP3-SAME: ptr [[PTR:%.*]]) {
; STOP3-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; STOP3-NEXT:    [[VECL:%.*]] = load <2 x float>, ptr [[PTR0]], align 4
; STOP3-NEXT:    [[VEC:%.*]] = fadd <2 x float> [[VECL]], zeroinitializer
; STOP3-NEXT:    store <2 x float> [[VEC]], ptr [[PTR0]], align 4
; STOP3-NEXT:    ret void
;
; NOSTOP-LABEL: define void @stop_bndl(
; NOSTOP-SAME: ptr [[PTR:%.*]]) {
; NOSTOP-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; NOSTOP-NEXT:    [[VECL:%.*]] = load <2 x float>, ptr [[PTR0]], align 4
; NOSTOP-NEXT:    [[VEC:%.*]] = fadd <2 x float> [[VECL]], zeroinitializer
; NOSTOP-NEXT:    store <2 x float> [[VEC]], ptr [[PTR0]], align 4
; NOSTOP-NEXT:    ret void
;
  %ptr0 = getelementptr float, ptr %ptr, i32 0
  %ptr1 = getelementptr float, ptr %ptr, i32 1
  %ld0 = load float, ptr %ptr0
  %ld1 = load float, ptr %ptr1
  %add0 = fadd float %ld0, 0.0
  %add1 = fadd float %ld1, 0.0
  store float %add0, ptr %ptr0
  store float %add1, ptr %ptr1
  ret void
}