This patch implements the auxiliary pass argument, a secondary argument that can be passed to Sandbox IR passes. It also updates the SeedCollection pass to accept the auxiliary argument "enable-diff-types", which enables collection of seeds of different types. This will be used in a follow-up patch.
21 lines
805 B
LLVM
21 lines
805 B
LLVM
; 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 -disable-output -sbvec-passes="seed-collection(enable-diff-types)<print-region>" %s | FileCheck %s
|
|
; REQUIRES: asserts
|
|
|
|
define void @collect_seeds_of_diff_types(ptr %ptr) {
|
|
; CHECK: Aux:
|
|
; CHECK-NEXT: store i8 %ld0, ptr %ptr0, {{.*}}
|
|
; CHECK-NEXT: store i16 %ld1, ptr %ptr1, {{.*}}
|
|
; CHECK-NEXT: store i8 %ld2, ptr %ptr2, {{.*}}
|
|
%ptr0 = getelementptr i8, ptr %ptr, i32 0
|
|
%ptr1 = getelementptr i16, ptr %ptr, i32 1
|
|
%ptr2 = getelementptr i8, ptr %ptr, i32 3
|
|
%ld0 = load i8, ptr %ptr0
|
|
%ld1 = load i16, ptr %ptr1
|
|
%ld2 = load i8, ptr %ptr2
|
|
store i8 %ld0, ptr %ptr0
|
|
store i16 %ld1, ptr %ptr1
|
|
store i8 %ld2, ptr %ptr2
|
|
ret void
|
|
}
|