File: bottomup_seed_slice_pow2.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 (34 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download | duplicates (2)
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
; 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=false -sbvec-passes="bottom-up-vec<>" %s -S | FileCheck %s --check-prefix=POW2
; RUN: opt -passes=sandbox-vectorizer -sbvec-vec-reg-bits=1024 -sbvec-allow-non-pow2=true -sbvec-passes="bottom-up-vec<>" %s -S | FileCheck %s --check-prefix=NON-POW2

define void @pow2(ptr %ptr, float %val) {
; POW2-LABEL: define void @pow2(
; POW2-SAME: ptr [[PTR:%.*]], float [[VAL:%.*]]) {
; POW2-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; POW2-NEXT:    [[PTR2:%.*]] = getelementptr float, ptr [[PTR]], i32 2
; POW2-NEXT:    [[VECL:%.*]] = load <2 x float>, ptr [[PTR0]], align 4
; POW2-NEXT:    [[LD2:%.*]] = load float, ptr [[PTR2]], align 4
; POW2-NEXT:    store <2 x float> [[VECL]], ptr [[PTR0]], align 4
; POW2-NEXT:    store float [[LD2]], ptr [[PTR2]], align 4
; POW2-NEXT:    ret void
;
; NON-POW2-LABEL: define void @pow2(
; NON-POW2-SAME: ptr [[PTR:%.*]], float [[VAL:%.*]]) {
; NON-POW2-NEXT:    [[PTR0:%.*]] = getelementptr float, ptr [[PTR]], i32 0
; NON-POW2-NEXT:    [[PACK2:%.*]] = load <3 x float>, ptr [[PTR0]], align 4
; NON-POW2-NEXT:    store <3 x float> [[PACK2]], ptr [[PTR0]], align 4
; NON-POW2-NEXT:    ret void
;
  %ptr0 = getelementptr float, ptr %ptr, i32 0
  %ptr1 = getelementptr float, ptr %ptr, i32 1
  %ptr2 = getelementptr float, ptr %ptr, i32 2

  %ld0 = load float, ptr %ptr0
  %ld1 = load float, ptr %ptr1
  %ld2 = load float, ptr %ptr2
  store float %ld0, ptr %ptr0
  store float %ld1, ptr %ptr1
  store float %ld2, ptr %ptr2
  ret void
}